Skip to content
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

Merged
merged 30 commits into from
Sep 17, 2024

Conversation

miguel-S73
Copy link
Contributor

@miguel-S73 miguel-S73 commented Mar 21, 2024

Standard migration from 16.0 to 17.0 and I have added cherry-pick #2524 and this suggestion OCA/server-backend#221 (review) too.

@miguel-S73 miguel-S73 force-pushed the 17.0-mig-sale_order_general_discount branch from c88e882 to 56b038f Compare March 21, 2024 12:48
@miguel-S73 miguel-S73 mentioned this pull request Mar 22, 2024
82 tasks
@gbtechnology
Copy link

@miguel-S73 some tests failed, do you need some help or you are already working on this?

@miguel-S73 miguel-S73 force-pushed the 17.0-mig-sale_order_general_discount branch from 56b038f to c0defa4 Compare March 27, 2024 15:04
@miguel-S73
Copy link
Contributor Author

@gbtechnology now I have fixed red flags

@gbtechnology
Copy link

@miguel-S73 cool!
Who is suppose to approve/merge this?

@miguel-S73
Copy link
Contributor Author

@sergio-teruel @pedrobaeza @ivantodorovich @rven
Anyone can review my PR?

@pedrobaeza pedrobaeza changed the title [MIG] sale_order_general_discount: 17.0 [17.0][MIG] sale_order_general_discount: 17.0 Apr 3, 2024
@pedrobaeza
Copy link
Member

Please say to one of your colleagues to review it and I'll review it too.

/ocabot migration sale_order_general_discount

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Apr 3, 2024
general_discount_apply = fields.Boolean(
string="Apply general discount",
default=True,
required=True,
Copy link
Member

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.

Copy link
Contributor Author

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(
Copy link
Member

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.

Copy link
Contributor Author

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):
Copy link
Member

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.

Copy link
Contributor Author

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.

@miguel-S73 miguel-S73 force-pushed the 17.0-mig-sale_order_general_discount branch from c0defa4 to e2c2fb4 Compare April 3, 2024 14:35
@rousseldenis
Copy link
Contributor

/ocabot migration sale_order_general_discount

stefan-tecnativa and others added 17 commits July 31, 2024 15:05
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/
@adrip-s73 adrip-s73 force-pushed the 17.0-mig-sale_order_general_discount branch from e2c2fb4 to 0c8f381 Compare July 31, 2024 13:07
@adrip-s73 adrip-s73 force-pushed the 17.0-mig-sale_order_general_discount branch from 0c8f381 to 0f8e50e Compare August 6, 2024 07:58
@rousseldenis
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-3030-by-rousseldenis-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit a9b43d8 into OCA:17.0 Sep 17, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 61f2e0b. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.