summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Zanotti (ADHOC) <bz@adhoc.com.ar>2021-03-10 12:40:07 +0000
committerBruno Zanotti (ADHOC) <bz@adhoc.com.ar>2021-03-18 14:36:08 +0000
commit728b59e4de0a2bcf321f2f0cfab47326363ff4b1 (patch)
tree3ecb30b59db1486b5e2cddd7011a0ce373ae66af
parente82a6318257adc3700e958c5daffda8735750bfc (diff)
[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#68090 X-original-commit: cfff5da8b14bb843537eda13fdb6f971c7074e46 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com> Signed-off-by: Josse Colpaert <jco@openerp.com>
-rw-r--r--addons/sale_stock/models/account_move.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/sale_stock/models/account_move.py b/addons/sale_stock/models/account_move.py
index 233e4882b98..7827f827037 100644
--- a/addons/sale_stock/models/account_move.py
+++ b/addons/sale_stock/models/account_move.py
@@ -95,6 +95,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