def __init__(self, wizard, previous, store, model, outstanding_value=currency(0)): self.parent = 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: self._installments_number = 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)
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()
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()
def __init__(self, wizard, store, document=None, description=None): self._description = description self._document = document WizardEditorStep.__init__(self, store, wizard) self._setup_widgets()
def __init__(self, store, wizard, model): WizardEditorStep.__init__(self, store, wizard, model) self._setup_widgets()
def __init__(self, store, wizard, model, groups): self.groups = groups WizardEditorStep.__init__(self, store, wizard, model) BaseMethodSelectionStep.__init__(self)
def __init__(self, wizard, previous): model = Settable(name='', email='', phone='', register_now=True) WizardEditorStep.__init__(self, None, wizard, model, previous) self._setup_widgets()
def __init__(self, wizard, previous, focus_dbname=True): self.focus_dbname = focus_dbname WizardEditorStep.__init__(self, None, wizard, wizard.settings, previous) self._update_widgets()
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)
def __init__(self, store, wizard, model): WizardEditorStep.__init__(self, store, wizard, model)
def __init__(self, wizard, previous, store, model): WizardEditorStep.__init__(self, store, wizard, model, previous)