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

[16.0][IMP] sale_global_discount: calculate lines with fixed taxes should be based on product uom qty #1

Conversation

QuocDuong1306
Copy link

@QuocDuong1306 QuocDuong1306 commented May 22, 2024

Context:

  • The taxes with fixed type should be matched with native odoo
  • BTW, I added one commit to update test-requirement.txt

It would be nice if the PR was merged

chienandalu and others added 30 commits May 20, 2024 09:30
Currently translated at 100.0% (6 of 6 strings)

Translation: sale-workflow-11.0/sale-workflow-11.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-11-0/sale-workflow-11-0-sale_global_discount/es/
Not all taxes combinations are possible with global discounts when they are later
invoiced and posted, so we need to constraint them early.

OCA/account-invoicing#745 addresses the problem at invoice level, posting correctly
taxes for supported cases, and constraining the rest.

We apply here the same constraints at sales order level. Existing tests have been
changed because they were using one of the forbidden taxes combination, and 2 new
tests have been added for covering the new constraints.
* Standard procedure
* Code adaptation
* README regeneration
* Tests adaptation

[UPD] Update sale_global_discount.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/
Currently translated at 100.0% (9 of 9 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/pt/
Currently translated at 100.0% (9 of 9 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/pt/
The tuple has changed from 4 to 6 elements.

[UPD] Update sale_global_discount.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/
Only global discount managers can set global discounts

[UPD] Update sale_global_discount.pot
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/
[UPD] Update sale_global_discount.pot
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/

[UPD] Update sale_global_discount.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/
Currently translated at 100.0% (10 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/pt/
Currently translated at 100.0% (10 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_global_discount/es/
[UPD] Update sale_global_discount.pot

[UPD] README.rst
This one is not present anymore in this version.
…sts to prevent errors if company have default currency distinct to default priceslist
…e other standard computed fields in same method are
Currently translated at 100.0% (13 of 13 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_global_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_global_discount/it/
…of base_global_discount

In this way we also include the following configuration step:
* Go to *Settings > Users*, choose yours and set *Manage Global Discounts*

Without this *Global Discounts* doesn't show up!
@ferran-S73 ferran-S73 force-pushed the 16.0-mig-sale_global_discount branch from e277af8 to 0cd899a Compare May 24, 2024 06:20
@ferran-S73 ferran-S73 force-pushed the 16.0-mig-sale_global_discount branch 2 times, most recently from 54cdf29 to ded6836 Compare June 20, 2024 06:55
Copy link

@cyrilmanuel cyrilmanuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not an expert but LGTM

Could you change the origin of the branch from studio73 to OCA --> Because the original PR was merged already --> OCA#2343

@trisdoan
Copy link

Hello @QuocDuong1306, I prepared OCA#321. You can close this one

@cyrilmanuel
Copy link

cyrilmanuel commented Jul 2, 2024

Hello @QuocDuong1306 , @trisdoan thanks a lot for your work :) just to be sure, the link point on a wrong PR i think it's for the PR 3216. That's mean you have merge the pull 1 and 2 on one pr in sale-workflow ??

@trisdoan
Copy link

trisdoan commented Jul 2, 2024

Hi, yeah silly me, you're right, both of them are included

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

Successfully merging this pull request may close these issues.