-
-
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_order_general_discount: 17.0 #3030
[17.0][MIG] sale_order_general_discount: 17.0 #3030
Conversation
c88e882
to
56b038f
Compare
@miguel-S73 some tests failed, do you need some help or you are already working on this? |
56b038f
to
c0defa4
Compare
@gbtechnology now I have fixed red flags |
@miguel-S73 cool! |
@sergio-teruel @pedrobaeza @ivantodorovich @rven |
Please say to one of your colleagues to review it and I'll review it too. /ocabot migration sale_order_general_discount |
general_discount_apply = fields.Boolean( | ||
string="Apply general discount", | ||
default=True, | ||
required=True, |
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.
required
in a boolean is useless.
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.
I removed this attribute in my last commit. My intention was to do a cherry-pick
and then apply my changes.
required=True, | ||
help="If this checkbox is ticked, it means changing general discount on sale order " | ||
"will impact sale order lines with this related product.", | ||
not_general_discount_apply = fields.Boolean( |
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.
It's not convenient to name negative fields. Better something like bypass_general_discount
.
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.
Now I have applied this suggested change
) | ||
|
||
@api.model_create_multi | ||
def create(self, vals_list): |
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.
I don't like this override, and doing the field computed writable shouldn't be needed.
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.
I have check funcionality after I remove this override and work fine.
c0defa4
to
e2c2fb4
Compare
/ocabot migration sale_order_general_discount |
…unt for all sale order lines
…nes created without UI form view
[MIG] Migrated sale_order_general_discount to v13. [IMP] Improved code as per request. [IMP][13.0] sale_order_general_discount: rebase with OCA/13.0 + apply pre-commit [UPD] sale_order_general_discount: update view to display percentage correctly
version conflict prevents upload to pypi
Currently translated at 100.0% (5 of 5 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_general_discount Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_general_discount/it/
Currently translated at 100.0% (5 of 5 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_general_discount Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_general_discount/pt_BR/
Set general discount as line discount only if there's a general discount.
It's not needed anymore. This is handled by the compute.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_general_discount Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_general_discount/
…al discount apply product option
e2c2fb4
to
0c8f381
Compare
0c8f381
to
0f8e50e
Compare
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 61f2e0b. Thanks a lot for contributing to OCA. ❤️ |
Standard migration from 16.0 to 17.0 and I have added
cherry-pick
#2524 and this suggestion OCA/server-backend#221 (review) too.