Custom addon data saving

I created a custom addon and when I try to save the form I am getting the following error

We’re sorry, but there seems to be an error…
Here is the full error message:

Display traceback as text

Traceback (innermost last):

Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
Module ZPublisher.Publish, line 48, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in call
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 237, in _exec
Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
Module Products.PageTemplates.PageTemplate, line 87, in pt_render
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module five.pt.engine, line 93, in call
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 191, in render
Module chameleon.template, line 171, in render
Module f3aa4579e3051f996f2702ed028482a8.py, line 183, in render
Module 1a55311e78ea38acd400f01b0c02c0d6.py, line 1223, in render_master
Module 1a55311e78ea38acd400f01b0c02c0d6.py, line 420, in render_content
Module f3aa4579e3051f996f2702ed028482a8.py, line 171, in __fill_content_core
Module f3aa4579e3051f996f2702ed028482a8.py, line 89, in render_content_core
AttributeError: widget

  • Expression: "python:context.widget('text', mode='view')"
  • Filename: ... cts/ATContentTypes/skins/ATContentTypes/document_view.pt
  • Location: (line 12: col 32)
  • Source: ... use-macro="python:context.widget('text', mode='view')">
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • Arguments: repeat: {...} (0)
    template: <ImplicitAcquisitionWrapper document_view at 0x7fc8610a1820>
    modules: <instance - at 0x7fc869f15518>
    here: <ImplicitAcquisitionWrapper ananth at 0x7fc860928820>
    user: <ImplicitAcquisitionWrapper - at 0x7fc8610950a0>
    nothing: <NoneType - at 0x560493c66560>
    container: <ImplicitAcquisitionWrapper ananth at 0x7fc860928820>
    default: <object - at 0x7fc872737550>
    request: <instance - at 0x7fc8600299e0>
    wrapped_repeat: <SafeMapping - at 0x7fc85cb34ec0>
    traverse_subpath: <list - at 0x7fc85ff4f710>
    loop: {...} (0)
    context: <ImplicitAcquisitionWrapper ananth at 0x7fc860928820>
    translate: <function translate at 0x7fc85c434500>
    root: <ImplicitAcquisitionWrapper Zope at 0x7fc8613427d0>
    options: {...} (1)
    target_language: <NoneType - at 0x560493c66560>

Please provide some code so we can try to help.