[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.
This commit is contained in:
Pedro M. Baeza
2020-07-15 17:51:56 +02:00
parent 86d82ee9ee
commit 5c4f40ebd0
2 changed files with 8 additions and 2 deletions

View File

@@ -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, "

View File

@@ -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