first commit
This commit is contained in:
19
modules/sale_product_customer/account.py
Normal file
19
modules/sale_product_customer/account.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.tools import cached_property
|
||||
|
||||
|
||||
class InvoiceLine(metaclass=PoolMeta):
|
||||
__name__ = 'account.invoice.line'
|
||||
|
||||
@cached_property
|
||||
def product_name(self):
|
||||
pool = Pool()
|
||||
SaleLine = pool.get('sale.line')
|
||||
name = super().product_name
|
||||
if (isinstance(self.origin, SaleLine)
|
||||
and self.origin.product_customer):
|
||||
name = self.origin.product_customer.rec_name
|
||||
return name
|
||||
Reference in New Issue
Block a user