From c70db5d5df45a5cf8bd3b289ed076e32a299ea81 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 20 Jun 2018 15:03:33 +0200 Subject: [PATCH] [FIX] stock_account: product on AML When changing the standard price of of a product set in perpetual valuation, the AML does not contain the corresponding product_id. opw-1859777 --- addons/stock_account/models/product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/stock_account/models/product.py b/addons/stock_account/models/product.py index 90287337c01..949098ce5cd 100644 --- a/addons/stock_account/models/product.py +++ b/addons/stock_account/models/product.py @@ -128,11 +128,13 @@ class ProductProduct(models.Model): 'account_id': debit_account_id, 'debit': abs(diff * qty_available), 'credit': 0, + 'product_id': product.id, }), (0, 0, { 'name': _('Standard Price changed'), 'account_id': credit_account_id, 'debit': 0, 'credit': abs(diff * qty_available), + 'product_id': product.id, })], } move = AccountMove.create(move_vals)