Change self.origin.__name__ for isinstance(self.origin, ...)
This commit refs #25971 (cherry picked from commitaa955cc274
) (cherry picked from commitddeb7f023c
)
This commit is contained in:
parent
42bc640315
commit
1ec9b69668
|
@ -9,7 +9,9 @@ class InvoiceLineSaleInfo(metaclass=PoolMeta):
|
|||
__name__ = 'account.invoice.line'
|
||||
|
||||
def get_shipment_out_numbers(self, name=None):
|
||||
if self.origin and self.origin.__name__ == 'sale.cost':
|
||||
SaleCost = Pool().get('sale.cost')
|
||||
|
||||
if self.origin and isinstance(self.origin, SaleCost):
|
||||
shipments = set([shipment.rec_name
|
||||
for shipment in self.origin.document.shipments])
|
||||
return ','.join(sorted(shipments))
|
||||
|
|
Loading…
Reference in New Issue