def on_recipient__validate(self, widget, recipient): if type(recipient) is Person: person = recipient else: person = recipient.person return StockOperationPersonValidationEvent.emit( person, type(recipient))
def on_client__validate(self, widget, client): if not client: return # this is used to avoid some tests from crashing if self.pm_slave is None: return method = self.pm_slave.get_selected_method() try: client.can_purchase(method, self.get_remaining_value()) except SellError as e: return ValidationError(e) return StockOperationPersonValidationEvent.emit(client.person, type(client))
def on_client__validate(self, widget, client): if not client: return # this is used to avoid some tests from crashing if self.pm_slave is None: return method = self.pm_slave.get_selected_method() try: client.can_purchase(method, self.get_remaining_value()) except SellError as e: return ValidationError(e) return StockOperationPersonValidationEvent.emit( client.person, type(client))
def on_client__validate(self, widget, client): return StockOperationPersonValidationEvent.emit(client.person, type(client))
def on_transporter_id__validate(self, widget, transporter_id): transporter = self.store.get(Transporter, transporter_id) return StockOperationPersonValidationEvent.emit(transporter.person, type(transporter))
def on_person__validate(self, widget, person_id): person = self.store.get(Person, person_id) return StockOperationPersonValidationEvent.emit(person, type(person))
def on_branch__validate(self, widget, branch): return StockOperationPersonValidationEvent.emit( branch.person, type(branch))
def on_transporter__validate(self, widget, transporter): return StockOperationPersonValidationEvent.emit( transporter.person, type(transporter))
def on_recipient__validate(self, widget, person): return StockOperationPersonValidationEvent.emit(person, type(person))
def on_branch__validate(self, widget, branch): return StockOperationPersonValidationEvent.emit(branch.person, type(branch))
def on_recipient__validate(self, widget, recipient): if type(recipient) is Person: person = recipient else: person = recipient.person return StockOperationPersonValidationEvent.emit(person, type(recipient))
def on_transporter__validate(self, widget, transporter): return StockOperationPersonValidationEvent.emit(transporter.person, type(transporter))