-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][MIG] sale_coupon_criteria_order_based #228
base: 17.0
Are you sure you want to change the base?
[17.0][MIG] sale_coupon_criteria_order_based #228
Conversation
Currently translated at 100.0% (10 of 10 strings) Translation: sale-promotion-14.0/sale-promotion-14.0-sale_coupon_criteria_order_based Translate-URL: https://translation.odoo-community.org/projects/sale-promotion-14-0/sale-promotion-14-0-sale_coupon_criteria_order_based/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-promotion-15.0/sale-promotion-15.0-sale_coupon_criteria_order_based Translate-URL: https://translation.odoo-community.org/projects/sale-promotion-15-0/sale-promotion-15-0-sale_coupon_criteria_order_based/
Currently translated at 85.7% (6 of 7 strings) Translation: sale-promotion-15.0/sale-promotion-15.0-sale_coupon_criteria_order_based Translate-URL: https://translation.odoo-community.org/projects/sale-promotion-15-0/sale-promotion-15-0-sale_coupon_criteria_order_based/it/
Currently translated at 100.0% (7 of 7 strings) Translation: sale-promotion-15.0/sale-promotion-15.0-sale_coupon_criteria_order_based Translate-URL: https://translation.odoo-community.org/projects/sale-promotion-15-0/sale-promotion-15-0-sale_coupon_criteria_order_based/es/
…tests This test requires a CoA to be installed, it should be tagged "post_install" TT46134
ping @francesco-ooops @Ivorra78 @pilarvargas-tecnativa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I totally forgot to update the doc
Yes, adding it right now
Yes, and they are evaluated sequencially, which allows to have more complex rules. |
@mmequignon that's good, what about adding to the doc also this explanation about the presence of the field in both the promo and the condition rule to make more explicit how it's supposed to work? |
ba0087c
to
2726966
Compare
@francesco-ooops I updated the PR, can you please make another pass ? |
@mmequignon ping me after tests are fixed :) |
2726966
to
a5fc044
Compare
@francesco-ooops done |
@mmequignon mmm I don't see the field |
That is because I added |
Well,
I don't want to be rude, but our time is valuable too :) |
I see your point, I just thought it would be better to stick to what was done for |
a5fc044
to
1a29aa7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional ok!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This PR has the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The criteria cannot be applied at rule level and at program level. You have to decide at which level it should be applied and follow the odoo flow to apply a promotion and respect the changes that have been made since version 16.0 to adapt the promotion modules. You can check the 16.0 branch and see how other modules have been migrated for reference.
class LoyaltyProgram(models.Model): | ||
_inherit = "loyalty.program" | ||
|
||
rule_order_domain = fields.Char(string="Based on Order", default="[]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are you going to apply the criteria? At the rule level or at the program level?
class LoyaltyRule(models.Model): | ||
_inherit = "loyalty.rule" | ||
|
||
rule_order_domain = fields.Char(string="Based on Order", default="[]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are you going to apply the criteria? At the rule level or at the program level?
class LoyaltyProgram(models.Model): | ||
_inherit = "loyalty.program" | ||
|
||
rule_order_domain = fields.Char(string="Based on Order", default="[]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense to use a M2o on ir.filter
in order to make it reusable between different programs?
No description provided.