changes in get_invoice_line

This commit is contained in:
Elvis 2023-10-12 08:54:07 -05:00
parent 0ab6c7e622
commit dc426e5a71
1 changed files with 8 additions and 0 deletions

View File

@ -85,6 +85,14 @@ class PurchaseLine(metaclass=PoolMeta):
table_h.column_rename('discount', 'discount_old')
super(PurchaseLine, cls).__register__(module_name)
def get_invoice_line(self):
'Return a list of invoice lines for sale line'
line = super(PurchaseLine, self).get_invoice_line()
if line and isinstance(line, list):
for l in line:
l.base_price = self.base_price
return line
@fields.depends(
methods=[
'compute_base_price', 'on_change_with_discount_rate',