From 1ac40de7a7832c8a5440d8767a828b6cf93a6cb9 Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Fri, 14 Dec 2018 14:46:38 +0100 Subject: [PATCH] [IMP] - archive contract_line on contract archive --- contract/models/contract_line.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contract/models/contract_line.py b/contract/models/contract_line.py index 63d01029..f0fa15c8 100644 --- a/contract/models/contract_line.py +++ b/contract/models/contract_line.py @@ -77,6 +77,9 @@ class AccountAnalyticInvoiceLine(models.Model): ], compute="_compute_state", ) + active = fields.Boolean( + string="Active", related="contract_id.active", strore=True + ) @api.multi def _compute_state(self): @@ -519,8 +522,6 @@ class AccountAnalyticInvoiceLine(models.Model): "invoiced at least one time." ) ) - old_date_start = rec.date_start - old_date_end = rec.date_end new_date_start = rec.date_start + delay_delta rec.recurring_next_date = self._compute_first_recurring_next_date( new_date_start,