diff --git a/contract_price_revision/models/account_analytic_account.py b/contract_price_revision/models/account_analytic_account.py index 515d80f8..9c5899cc 100644 --- a/contract_price_revision/models/account_analytic_account.py +++ b/contract_price_revision/models/account_analytic_account.py @@ -9,7 +9,9 @@ class AccountAnalyticAccount(models.Model): @api.model def _prepare_invoice_line(self, line, invoice_id): line_obj = self.env['account.invoice.line'] - invoice = self.env['account.invoice'].browse(invoice_id) + invoice = self.env['account.invoice'].browse( + invoice_id, prefetch=self._prefetch, + ) # Line with automatic price are not taken into account if (line.date_start and invoice.date_invoice < line.date_start) or \ (line.date_end and invoice.date_invoice > line.date_end): diff --git a/contract_price_revision/wizards/create_revision_line_views.xml b/contract_price_revision/wizards/create_revision_line_views.xml index 9c249ec5..e4d038f3 100644 --- a/contract_price_revision/wizards/create_revision_line_views.xml +++ b/contract_price_revision/wizards/create_revision_line_views.xml @@ -23,7 +23,6 @@