From 3590efa47849be09e694e7755ec640f41cb14313 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 19 Mar 2020 10:16:25 +0000 Subject: [PATCH] [FIX] stock_account: no analytic info on COGS - Create a FIFO product, Automated - Make some stock - Create a SO, add the product - On the SO, add an analytic account - Validate the picking, create the invoice => the analytic info are propagated to the invoice, as expected - Validate the invoice The analytic info is propagated on the COGS entries, in particular the the output account, which is incorrect. Lost forward-port of 24c7efc8fef63437ac28883b29ed84809234ed76 closes odoo/odoo#47995 Signed-off-by: Nicolas Martinelli (nim) --- addons/stock_account/models/account_move.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/stock_account/models/account_move.py b/addons/stock_account/models/account_move.py index c9e0676b433..4a88391dc2e 100644 --- a/addons/stock_account/models/account_move.py +++ b/addons/stock_account/models/account_move.py @@ -125,8 +125,6 @@ class AccountMove(models.Model): 'debit': balance < 0.0 and -balance or 0.0, 'credit': balance > 0.0 and balance or 0.0, 'account_id': debit_interim_account.id, - 'analytic_account_id': line.analytic_account_id.id, - 'analytic_tag_ids': [(6, 0, line.analytic_tag_ids.ids)], 'exclude_from_invoice_tab': True, 'is_anglo_saxon_line': True, })