From 5c4f40ebd06167a3a34635cbf2bbf342b873c7ed Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 15 Jul 2020 17:51:56 +0200 Subject: [PATCH] [FIX] contract: Proper depends for create_invoice_visibility Although is not probable that you change these fields once created, a proper dependency chain can save several problems. --- contract/__manifest__.py | 2 +- contract/models/contract_line.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/contract/__manifest__.py b/contract/__manifest__.py index 5ccc722cd..27a1d4f38 100644 --- a/contract/__manifest__.py +++ b/contract/__manifest__.py @@ -9,7 +9,7 @@ { 'name': 'Recurring - Contracts Management', - 'version': '12.0.7.2.4', + 'version': '12.0.7.2.5', 'category': 'Contract Management', 'license': 'AGPL-3', 'author': "OpenERP SA, " diff --git a/contract/models/contract_line.py b/contract/models/contract_line.py index 1526b73f6..e50ed6d1a 100644 --- a/contract/models/contract_line.py +++ b/contract/models/contract_line.py @@ -649,7 +649,13 @@ class ContractLine(models.Model): % line.name ) - @api.depends('recurring_next_date', 'date_start', 'date_end') + @api.depends( + 'display_type', + 'is_recurring_note', + 'recurring_next_date', + 'date_start', + 'date_end', + ) def _compute_create_invoice_visibility(self): # TODO: depending on the lines, and their order, some sections # have no meaning in certain invoices