From ef2961adf00e62f74d50179111e01100ebb32c01 Mon Sep 17 00:00:00 2001 From: "Bruno Zanotti (ADHOC)" Date: Wed, 10 Mar 2021 12:40:07 +0000 Subject: [PATCH] [FIX] sale_stock: Enable adding custom fields to the lots table If we add the id on the values returned by the method _get_invoiced_lot_values() then we can inherit it to add custom fields on the table of invoiced lot on the invoice's report. closes odoo/odoo#68100 X-original-commit: cfff5da8b14bb843537eda13fdb6f971c7074e46 Signed-off-by: Arnold Moyaux Signed-off-by: Josse Colpaert --- addons/sale_stock/models/account_move.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/sale_stock/models/account_move.py b/addons/sale_stock/models/account_move.py index 07488bce8a1..bd95e155ce2 100644 --- a/addons/sale_stock/models/account_move.py +++ b/addons/sale_stock/models/account_move.py @@ -97,6 +97,8 @@ class AccountMove(models.Model): 'quantity': qty, 'uom_name': lot_id.product_uom_id.name, 'lot_name': lot_id.name, + # The lot id is needed by localizations to inherit the method and add custom fields on the invoice's report. + 'lot_id': lot_id.id }) return lot_values