From 9c1ea26b8d1cbbc8be1aa32f61322510ed1ce011 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 27 Feb 2021 13:41:48 +0100 Subject: [PATCH] [OU-FIX] contract: Don't alter v12 recurrence mechanism We can't guarantee the homogeneity of the existing contracts, so we keep the line recurrence behavior. --- contract/migrations/13.0.1.0.0/post-migration.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contract/migrations/13.0.1.0.0/post-migration.py b/contract/migrations/13.0.1.0.0/post-migration.py index 23c29c718..37140d381 100644 --- a/contract/migrations/13.0.1.0.0/post-migration.py +++ b/contract/migrations/13.0.1.0.0/post-migration.py @@ -1,4 +1,4 @@ -# Copyright 2020 Tecnativa - Pedro M. Baeza +# Copyright 2020-2021 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade # pylint: disable=W7936 @@ -9,3 +9,6 @@ def migrate(env, version): openupgrade.load_data( env.cr, "contract", "migrations/13.0.1.0.0/noupdate_changes.xml" ) + # Don't alter line recurrence v12 behavior + contracts = env["contract.contract"].search([]) + contracts.write({"line_recurrence": True})