Skip to content

Commit

Permalink
[FIX] loyalty_criteria_multi_product: Complete loyalty_rule table data
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pilarvargas-tecnativa committed Jul 15, 2024
1 parent 47fb9c7 commit ad3b7ee
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad3b7ee

Please sign in to comment.