mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] - Should be able to stop a past contract line
This commit is contained in:
@@ -999,7 +999,7 @@ class AccountAnalyticInvoiceLine(models.Model):
|
||||
res = self.env['account.analytic.invoice.line']
|
||||
for rec in self:
|
||||
is_auto_renew = rec.is_auto_renew
|
||||
rec.is_auto_renew = False
|
||||
rec.stop(rec.date_end, post_message=False)
|
||||
date_start, date_end = rec._get_renewal_dates()
|
||||
new_line = rec.plan_successor(
|
||||
date_start, date_end, is_auto_renew, post_message=False
|
||||
|
||||
@@ -303,7 +303,7 @@ CRITERIA_ALLOWED_DICT = {
|
||||
): Allowed(
|
||||
plan_successor=False,
|
||||
stop_plan_successor=False,
|
||||
stop=False,
|
||||
stop=True,
|
||||
cancel=False,
|
||||
uncancel=False,
|
||||
),
|
||||
@@ -333,7 +333,7 @@ CRITERIA_ALLOWED_DICT = {
|
||||
): Allowed(
|
||||
plan_successor=True,
|
||||
stop_plan_successor=False,
|
||||
stop=False,
|
||||
stop=True,
|
||||
cancel=False,
|
||||
uncancel=False,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user