Esempio n. 1
0
 def action_add_or_edit(self, resource, context, record):
     # Is authorized ?
     self.is_allowed_to_edit_record(resource.handler, context)
     # We add current user
     record['user'] = context.user.name
     # Normal action
     Table_EditRecord.action_add_or_edit(self, resource, context, record)
Esempio n. 2
0
 def action_add_or_edit(self, resource, context, record):
     # Is authorized ?
     self.is_allowed_to_edit_record(resource.handler, context)
     # We add current user
     record['user'] = context.user.name
     # Normal action
     Table_EditRecord.action_add_or_edit(self, resource, context, record)
Esempio n. 3
0
 def get_widgets(self, resource, context):
     return [x for x in Table_EditRecord.get_widgets(self, resource, context) \
                                     if x.name not in self.cant_edit_fields]
Esempio n. 4
0
 def _get_form(self, resource, context):
     form = Table_EditRecord._get_form(self, resource, context)
     # We check if the image path refer to an Image instance
     path = form['name']
     check_photo(path, resource, 'name')
     return form
Esempio n. 5
0
 def _get_form(self, resource, context):
     form = Table_EditRecord._get_form(self, resource, context)
     # We check if the image path refer to an Image instance
     path = form['name']
     check_photo(path, resource, 'name')
     return form