From 2cafe7425a4b3ba65d75afb90f6333dababe9f05 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 15 Jul 2020 17:39:05 +0200 Subject: [PATCH] [FIX] contract: Proper is_recurring_note compute method Before, the compute method had the same name as the field. --- contract/__manifest__.py | 2 +- contract/models/abstract_contract_line.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contract/__manifest__.py b/contract/__manifest__.py index c2a68fe6b..662046fa0 100644 --- a/contract/__manifest__.py +++ b/contract/__manifest__.py @@ -9,7 +9,7 @@ { 'name': 'Recurring - Contracts Management', - 'version': '12.0.7.2.2', + 'version': '12.0.7.2.3', 'category': 'Contract Management', 'license': 'AGPL-3', 'author': "OpenERP SA, " diff --git a/contract/models/abstract_contract_line.py b/contract/models/abstract_contract_line.py index 5d2598a65..dce120d90 100644 --- a/contract/models/abstract_contract_line.py +++ b/contract/models/abstract_contract_line.py @@ -161,7 +161,8 @@ class ContractAbstractContractLine(models.AbstractModel): else: return 1 - def is_recurring_note(self): + @api.depends("display_type", "note_invoicing_mode") + def _compute_is_recurring_note(self): for record in self: record.is_recurring_note = ( record.display_type == 'line_note'