From e544ec8df7028e6a9ffb2c9b2a3ec64035c33bf9 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 20 Feb 2018 15:23:40 +0100 Subject: [PATCH] [FIX] stock_account: method expect a record, not an id Backport of 6cedc90f69d8c4fb82da19a6ed8a1ed3460101bc opw-817262 --- addons/stock_account/stock_account.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock_account/stock_account.py b/addons/stock_account/stock_account.py index 88c1c1edaf2..18c07c0fbed 100644 --- a/addons/stock_account/stock_account.py +++ b/addons/stock_account/stock_account.py @@ -136,13 +136,13 @@ class account_invoice(osv.osv): company_currency = inv.company_id.currency_id price_unit = i_line._get_anglo_saxon_price_unit() if inv.currency_id != company_currency: - currency_id = inv.currency_id.id + currency = inv.currency_id amount_currency = i_line._get_price(inv, company_currency.id, i_line, price_unit) else: - currency_id = False + currency = False amount_currency = False - return self.env['product.product']._anglo_saxon_sale_move_lines(i_line.name, i_line.product_id, i_line.uom_id, i_line.quantity, price_unit, currency=currency_id, amount_currency=amount_currency, fiscal_position=inv.fiscal_position_id, account_analytic=i_line.account_analytic_id) + return self.env['product.product']._anglo_saxon_sale_move_lines(i_line.name, i_line.product_id, i_line.uom_id, i_line.quantity, price_unit, currency=currency, amount_currency=amount_currency, fiscal_position=inv.fiscal_position_id, account_analytic=i_line.account_analytic_id) #----------------------------------------------------------