def get_order_object(self): """Get the order object related to this payment group""" for obj in [self.sale, self.purchase, self._renegotiation, self.stock_decrease]: if obj is not None: return obj return PaymentGroupGetOrderEvent.emit(self, self.store)
def get_order_object(self): """Get the order object related to this payment group""" for obj in [self.sale, self.purchase, self._renegotiation, self.stock_decrease, self.receiving_invoice]: if obj is not None: return obj return PaymentGroupGetOrderEvent.emit(self, self.store)