Esempio n. 1
0
    def __init__(self,
                 wizard,
                 previous,
                 store,
                 model,
                 outstanding_value=currency(0)):
        self.order = model
        self.slave = None
        self.discount_surcharge_slave = None
        self.outstanding_value = outstanding_value

        if not model.payments.count():
            # Default values
            self._installments_number = None
            self._first_duedate = None
            self._method = 'bill'
        else:
            # FIXME: SqlObject returns count as long, but we need it as int.
            self._installments_number = int(model.payments.count())
            self._method = model.payments[0].method.method_name

            # due_date is datetime.datetime. Converting it to datetime.date
            due_date = model.payments[0].due_date.date()
            self._first_duedate = (due_date >= localtoday().date() and due_date
                                   or None)

        WizardEditorStep.__init__(self, store, wizard, model.group, previous)
Esempio n. 2
0
 def __init__(self, wizard, store, model):
     WizardEditorStep.__init__(self, store, wizard, model)
     pm = PermissionManager.get_permission_manager()
     if not pm.can_create('Supplier'):
         self.add_supplier.hide()
     if not pm.can_edit('Supplier'):
         self.edit_supplier.hide()
Esempio n. 3
0
    def __init__(self, wizard, store, model, payment_group, previous=None):
        self.pm_slave = None
        self.payment_group = payment_group

        BaseMethodSelectionStep.__init__(self)
        marker("WizardEditorStep.__init__")
        WizardEditorStep.__init__(self, store, wizard, model,
                                  previous=previous)

        self._update_totals()
        self.update_discount_and_surcharge()
Esempio n. 4
0
    def __init__(self, wizard, store, model, payment_group, previous=None):
        self.pm_slave = None
        self.payment_group = payment_group

        BaseMethodSelectionStep.__init__(self)
        marker("WizardEditorStep.__init__")
        WizardEditorStep.__init__(self, store, wizard, model,
                                  previous=previous)

        self._update_totals()
        self.update_discount_and_surcharge()
Esempio n. 5
0
    def __init__(self, wizard, store, model, payment_group, invoice_model):
        self.invoice_model = invoice_model

        self.payment_group = payment_group

        BaseMethodSelectionStep.__init__(self)
        marker("WizardEditorStep.__init__")
        WizardEditorStep.__init__(self, store, wizard, model)

        self._update_totals()
        self.update_discount_and_surcharge()
Esempio n. 6
0
    def __init__(self, wizard, store, model, payment_group,
                 invoice_model):
        self.invoice_model = invoice_model

        self.payment_group = payment_group

        BaseMethodSelectionStep.__init__(self)
        marker("WizardEditorStep.__init__")
        WizardEditorStep.__init__(self, store, wizard, model)

        self._update_totals()
        self.update_discount_and_surcharge()
Esempio n. 7
0
    def __init__(self, wizard, previous, store, model, outstanding_value=currency(0)):
        self.order = model
        self.slave = None
        self.discount_surcharge_slave = None
        self.outstanding_value = outstanding_value

        if not model.payments.count():
            # Default values
            self._installments_number = None
            self._first_duedate = None
            self._method = "bill"
        else:
            # FIXME: SqlObject returns count as long, but we need it as int.
            self._installments_number = int(model.payments.count())
            self._method = model.payments[0].method.method_name

            # due_date is datetime.datetime. Converting it to datetime.date
            due_date = model.payments[0].due_date.date()
            self._first_duedate = due_date >= localtoday().date() and due_date or None

        WizardEditorStep.__init__(self, store, wizard, model.group, previous)
Esempio n. 8
0
 def __init__(self, wizard, previous, store, model):
     WizardEditorStep.__init__(self, store, wizard, model, previous)
Esempio n. 9
0
 def __init__(self, wizard, previous, store, model):
     WizardEditorStep.__init__(self, store, wizard, model, previous)
     self._setup_widgets()
Esempio n. 10
0
 def __init__(self, store, wizard, model):
     WizardEditorStep.__init__(self, store, wizard, model)
     self._setup_widgets()
Esempio n. 11
0
 def __init__(self, wizard, previous, store, model):
     WizardEditorStep.__init__(self, store, wizard, model, previous)
Esempio n. 12
0
 def __init__(self, store, wizard, model, groups):
     self.groups = groups
     WizardEditorStep.__init__(self, store, wizard, model)
     BaseMethodSelectionStep.__init__(self)
Esempio n. 13
0
 def __init__(self, wizard, previous, focus_dbname=True):
     self.focus_dbname = focus_dbname
     WizardEditorStep.__init__(self, None, wizard, wizard.settings,
                               previous)
     self._update_widgets()
Esempio n. 14
0
 def __init__(self, store, wizard, model):
     WizardEditorStep.__init__(self, store, wizard, model)
Esempio n. 15
0
 def __init__(self, wizard, store):
     WizardEditorStep.__init__(self, store, wizard)
     self._setup_widgets()
Esempio n. 16
0
 def __init__(self, wizard, store, model):
     self.branch = api.get_current_branch(store)
     WizardEditorStep.__init__(self, store, wizard, model)
Esempio n. 17
0
 def __init__(self, wizard, store, model):
     self.branch = api.get_current_branch(store)
     manager = get_plugin_manager()
     self._nfe_is_active = manager.is_active('nfe')
     WizardEditorStep.__init__(self, store, wizard, model)
Esempio n. 18
0
 def __init__(self, wizard, store, model):
     self.branch = api.get_current_branch(store)
     WizardEditorStep.__init__(self, store, wizard, model)
Esempio n. 19
0
 def __init__(self, store, wizard, model, groups):
     self.groups = groups
     WizardEditorStep.__init__(self, store, wizard, model)
     BaseMethodSelectionStep.__init__(self)
Esempio n. 20
0
 def __init__(self, wizard, previous, focus_dbname=True):
     self.focus_dbname = focus_dbname
     WizardEditorStep.__init__(self, None, wizard, wizard.settings,
                               previous)
     self._update_widgets()
Esempio n. 21
0
 def __init__(self, wizard, store, model):
     self.branch = api.get_current_branch(store)
     manager = get_plugin_manager()
     self._nfe_is_active = manager.is_active('nfe')
     WizardEditorStep.__init__(self, store, wizard, model)
Esempio n. 22
0
 def __init__(self, wizard, previous):
     model = Settable(name='', email='', phone='')
     WizardEditorStep.__init__(self, None, wizard, model, previous)
     self._setup_widgets()
Esempio n. 23
0
 def __init__(self, wizard, previous):
     model = Settable(name='', email='', phone='', register_now=True)
     WizardEditorStep.__init__(self, None, wizard, model, previous)
     self._setup_widgets()
Esempio n. 24
0
 def __init__(self, wizard, store, document=None, description=None):
     self._description = description
     self._document = document
     WizardEditorStep.__init__(self, store, wizard)
     self._setup_widgets()