Ejemplo n.º 1
0
 def before(self, form):
     BaseEditView.before(self, form)
     self.request.actionmenu.add(
         ViewLink(
             label=u"Revenir à la facture",
             path="/invoices/{id}.html",
             id=self.context.id,
             _anchor="treasury",
         ))
Ejemplo n.º 2
0
 def before(self, form):
     BaseEditView.before(self, form)
     self.request.actionmenu.add(
         ViewLink(
             label=u"Revenir à la facture",
             path="/invoices/{id}.html",
             id=self.context.id,
             _anchor="treasury",
         )
     )
 def get_default_appstruct(self):
     result = BaseEditView.get_default_appstruct(self)
     if self.is_total_form():
         result['total_type'] = self.context.total_type
         result['account_prefix'] = ''
         result[self.context.total_type] = self.context.account_prefix
     return result
    def merge_appstruct(self, appstruct, model):
        """
        Handle specific form keys when setting the new model's datas

        Regarding the type of total we manage (category total or operation
        specific total), we want to set some attributes
        """
        model = BaseEditView.merge_appstruct(self, appstruct, model)
        if 'total_type' in appstruct:
            total_type = appstruct['total_type']
            model.account_prefix = appstruct[total_type]

        return model
Ejemplo n.º 5
0
 def before(self, form):
     BaseEditView.before(self, form)
     self.populate_navigation()
Ejemplo n.º 6
0
 def before(self, form):
     BaseEditView.before(self, form)
     auto_need(form)
     form.widget = AccordionFormWidget(named_grids=FORM_GRID)
Ejemplo n.º 7
0
 def before(self, form):
     self.populate_navigation()
     return BaseEditView.before(self, form)
Ejemplo n.º 8
0
 def before(self, form):
     self.populate_navigation()
     return BaseEditView.before(self, form)
Ejemplo n.º 9
0
 def before(self, form):
     BaseEditView.before(self, form)
     self.populate_navigation()
 def __init__(self, *args, **kwargs):
     BaseEditView.__init__(self, *args, **kwargs)
Ejemplo n.º 11
0
 def before(self, form):
     BaseEditView.before(self, form)
     auto_need(form)
     form.widget = AccordionFormWidget(named_grids=FORM_GRID)