-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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_promotion_rule #3202
base: 17.0
Are you sure you want to change the base?
[17.0][MIG] sale_promotion_rule #3202
Conversation
The module now supports multiple promotion rules. When a coupon is used, it always take precedence on automatic promotion rule. The computation of promotions has been refactored to update lines from the sale.order object. Sine lines are updated from the SO, the recompute of SO fields that depends of lines is only tiggered at the end of the update on the lines. (In place of each time a line is updated). You can ask to recompute the promotion of a sale.order. If a coupon is already specified it's conserved but all the automatic rules are applied again.
…oducing a side effect on the expected results of all sale order created into unitest
The field reference the name of the field to use on the sale order to determine if the promotion is applicable according to the total amount.
…new field for display_name
When checking if a promotion rule can be applied according to its usage definition, usage search_count in place of search since we are not interested by the resultset
… rule strategy check [UPD] Update sale_promotion_rule.pot
[UPD] README.rst
…der amount total In some cases some lines must not be taken into account into the sale order total when checking if the minimal amount specified on the promotion rule is reached. As side effect we must be more strict on the way we get the total on te sale order and if taxes are included or excluded into the total
[UPD] Update sale_promotion_rule.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-10.0/sale-workflow-10.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_promotion_rule/ [UPD] Update sale_promotion_rule.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-10.0/sale-workflow-10.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_promotion_rule/
Before this change, only percentage were applicable as discount by promotion rule. This change allows you to define rules that apply a discount in the form of a specific amount. This amount is translated as a percentage disctributed on the different lines during the rule resolution in order to benefit from the standard mechanism for calculating discount by Odoo.
…with fixed amount While the first approach based on the reuse of the standard Odoo field "discount_amount" seemed the least intrusive, it is unfortunately impossible to avoid rounding problems due to the transformation of a fixed amount into a percentage of dicount to be applied on the different products. Rounding problems are further aggravated when a so contains lines with products with a high price difference. Since it's not possible to rely on the standard Odoo field, the implementation of the fixed amount discount is now based the usage of a dedicated product.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-10.0/sale-workflow-10.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_promotion_rule/ [UPD] Update sale_promotion_rule.pot
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-10.0/sale-workflow-10.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_promotion_rule/
[UPD] Update sale_promotion_rule.pot
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-10.0/sale-workflow-10.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_promotion_rule/ [UPD] Update sale_promotion_rule.pot
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-10.0/sale-workflow-10.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_promotion_rule/
If the coupon rule apply a discount in fixed price, the rule should not be applied on each sale order line
Sequence order was never applied du of missing _order [UPD] Update sale_promotion_rule.pot
If no rule is percentage (i.e. edit discount field) we should not clear the discount when removing promotions.
Fix tests using demo data modified by other modules
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-14.0/sale-workflow-14.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_promotion_rule/
Currently translated at 100.0% (71 of 71 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_promotion_rule Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_promotion_rule/es/
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
/ocabot migration sale_promotion_rule |
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.
Code review
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.
Code review, LGTM 👍.
Standard Migration
@ForgeFlow