Skip to content
Snippets Groups Projects
Commit e861e6dd authored by David Monjoie's avatar David Monjoie
Browse files

[FIX] purchase_stock: fix wrong date after forward-port

parent 3c1e886c
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ class AccountInvoice(models.Model): ...@@ -57,7 +57,7 @@ class AccountInvoice(models.Model):
valuation_price_unit = po_currency._convert( valuation_price_unit = po_currency._convert(
i_line.purchase_line_id.product_uom._compute_price(i_line.purchase_line_id.price_unit, i_line.uom_id), i_line.purchase_line_id.product_uom._compute_price(i_line.purchase_line_id.price_unit, i_line.uom_id),
inv.currency_id, inv.currency_id,
company=po_company, date=inv.date, round=False, company=po_company, date=inv.date_invoice, round=False,
) )
stock_move_obj = self.env['stock.move'] stock_move_obj = self.env['stock.move']
valuation_stock_move = stock_move_obj.search([ valuation_stock_move = stock_move_obj.search([
...@@ -90,7 +90,7 @@ class AccountInvoice(models.Model): ...@@ -90,7 +90,7 @@ class AccountInvoice(models.Model):
# In this condition, we have a real price-valuated product which has not yet been received # In this condition, we have a real price-valuated product which has not yet been received
valuation_price_unit = po_currency._convert( valuation_price_unit = po_currency._convert(
i_line.purchase_line_id.price_unit, inv.currency_id, i_line.purchase_line_id.price_unit, inv.currency_id,
company=po_company, date=inv.date, round=False, company=po_company, date=inv.date_invoice, round=False,
) )
interim_account_price = valuation_price_unit * line_quantity interim_account_price = valuation_price_unit * line_quantity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment