From ad3b7ee66e894f47daa7dd68f21c63f324470689 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Mon, 15 Jul 2024 13:51:44 +0200 Subject: [PATCH] [FIX] loyalty_criteria_multi_product: Complete loyalty_rule table data The loyalty_criteria field data, previously in the loyalty_program table (coupon_program) must be moved completely, both the value 'multi_product' and 'domain' to the loyalty_rule table where this data must now be stored. Otherwise the data 'domain' will be lost. TT44317 --- .../migrations/16.0.1.0.0/pre-migration.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/loyalty_criteria_multi_product/migrations/16.0.1.0.0/pre-migration.py b/loyalty_criteria_multi_product/migrations/16.0.1.0.0/pre-migration.py index 6efc6d15..64c08928 100644 --- a/loyalty_criteria_multi_product/migrations/16.0.1.0.0/pre-migration.py +++ b/loyalty_criteria_multi_product/migrations/16.0.1.0.0/pre-migration.py @@ -19,10 +19,9 @@ def move_coupon_criteria_to_rule(env): env.cr, """ UPDATE loyalty_rule AS lr - SET loyalty_criteria = 'multi_product' + SET loyalty_criteria = lp.coupon_criteria FROM loyalty_program AS lp WHERE lr.program_id = lp.id - AND lp.coupon_criteria = 'multi_product' """, ) # coupon_criteria_ids to loyalty_criteria_ids