From 60fffbd1e543698d86eb8abbf1deb722d46346c3 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Thu, 25 Oct 2018 14:06:01 +0200 Subject: [PATCH] correct computation of lot relations in account_invoice.py --- .../dp_reports_account/models/account_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/custom-addons/dp_reports_account/models/account_invoice.py b/ext/custom-addons/dp_reports_account/models/account_invoice.py index d354d342..c6a557fc 100644 --- a/ext/custom-addons/dp_reports_account/models/account_invoice.py +++ b/ext/custom-addons/dp_reports_account/models/account_invoice.py @@ -48,6 +48,7 @@ class AccountInvoiceLine(models.Model): ) lot_formatted_note = fields.Html( + comodel_name='stock.production.lot', string='Formatted Note', compute='_compute_line_lots', ) @@ -57,9 +58,8 @@ class AccountInvoiceLine(models.Model): for line in self: if not line.order_line_ids: return - line.prod_lot_ids = self.mapped( + line.prod_lot_ids = line.mapped( 'order_line_ids.move_ids.move_line_ids.lot_id') - print('End') @api.multi def _compute_line_lots(self):