Do not use purchase_unit_price field as it does not exists anymore.

This commit is contained in:
Sergio Morillo 2022-04-18 12:00:22 +02:00
parent 5ab50e40ba
commit bfdfb5b9f6
1 changed files with 1 additions and 1 deletions

View File

@ -25,4 +25,4 @@ class Lot(metaclass=PoolMeta):
('effective_date', '<=', date)
], order=[('effective_date', 'DESC')])
if moves:
return moves[0].purchase_unit_price
return moves[0].origin.unit_price