Ejemplo n.º 1
0
    def setup_slaves(self):
        if not self.model.receiving_invoice:
            return

        self.invoice_slave = ReceivingInvoiceSlave(
            self.store, self.model.receiving_invoice, visual_mode=True)
        self.attach_slave("details_holder", self.invoice_slave)
Ejemplo n.º 2
0
 def post_init(self):
     self._is_valid = False
     self.invoice_slave = ReceivingInvoiceSlave(
         self.store, self.model.receiving_invoice)
     self.invoice_slave.connect('activate', self._on_invoice_slave__activate)
     self.attach_slave("place_holder", self.invoice_slave)
     # Slaves must be focused after being attached
     self.invoice_slave.invoice_number.grab_focus()
     self.register_validate_function(self._validate_func)
     self.force_validation()
     if not self.has_next_step():
         self.wizard.enable_finish()
Ejemplo n.º 3
0
    def post_init(self):
        # If the user is comming back from the next, make sure things don't get
        # messed
        if self.store.savepoint_exists('before_invoicepayment_step'):
            self.store.rollback_to_savepoint('before_invoicepayment_step')

        self._is_valid = False
        self.invoice_slave = ReceivingInvoiceSlave(self.store, self.model)
        self.invoice_slave.connect('activate',
                                   self._on_invoice_slave__activate)
        self.attach_slave("place_holder", self.invoice_slave)
        # Slaves must be focused after being attached
        self.invoice_slave.invoice_number.grab_focus()
        self.register_validate_function(self._validate_func)
        self.force_validation()