-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP-FIX] loyalty_multi_gift: Continue migration to v16
- Added migration script - Adapt test - Adapt methods and views TT44321
- Loading branch information
1 parent
0ee1ad2
commit 5cd0bbd
Showing
13 changed files
with
334 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2023 Tecnativa - Pilar Vargas | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
_renamed_fields = [ | ||
( | ||
"loyalty.reward", | ||
"loyalty_reward", | ||
"coupon_multi_gift_ids", | ||
"loyalty_multi_gift_ids", | ||
), | ||
] | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.rename_fields(env, _renamed_fields) | ||
openupgrade.rename_models( | ||
env.cr, [("coupon.reward.product_line", "loyalty.reward.product_line")] | ||
) | ||
openupgrade.rename_tables( | ||
env.cr, [("coupon_reward_product_line", "loyalty_reward_product_line")] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
For the 'buy_x_get_y' type promotion, the 'Reward_type' field is restricted to the 'Product' | ||
option only and the possibility to select 'Multigift' is disabled. This restriction is implemented | ||
because, in this scenario, the 'reward_type' field becomes 'readonly'. | ||
|
||
It is crucial to note that modifying the values displayed in this field to set different | ||
values according to the type of promotion may generate conflicts with other modules that | ||
contribute to the configuration of this same field. Therefore, it is recommended not to | ||
alter these values directly, as this may affect the consistency and functionality of other | ||
components of the system. | ||
|
||
To configure similar promotions, it is suggested to modify another type of promotion by | ||
adapting its rules and rewards according to specific needs. This provides a more secure | ||
and consistent way to manage custom configurations without compromising the integrity of | ||
the system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.