class FinishOpenProductionOrderStep(BaseWizardStep): gladefile = 'HolderTemplate' model_type = ProductionOrder proxy_widgets = [] def __init__(self, wizard, previous, store, model): self._order = model BaseWizardStep.__init__(self, store, wizard, previous) self._setup_slaves() def _setup_slaves(self): self._slave = ProductionMaterialListSlave(self.store, self._order, visual_mode=True) self.attach_slave('place_holder', self._slave) # # WizardStep hooks # def has_next_step(self): return False def post_init(self): self.register_validate_function(self.wizard.refresh_next) self.force_validation() # Reload materials, so if we go back and forward, the materials are # updated properly, self._slave.reload_materials() def validate_step(self): return self._slave.validate_confirm()
def _setup_slaves(self): self._slave = ProductionMaterialListSlave(self.store, self._order, visual_mode=True) self.attach_slave('place_holder', self._slave)
def setup_slaves(self): self._slave = ProductionMaterialListSlave(self.store, self.model, False) self.attach_slave('main_holder', self._slave)