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_triple_discount: Migration to 17.0 #3157

Open
wants to merge 39 commits into
base: 17.0
Choose a base branch
from

Conversation

Boxnia
Copy link

@Boxnia Boxnia commented May 28, 2024

@Boxnia Boxnia changed the title [MIG] sale_triple_discount: Migration to 17.0 [17.0][MIG] sale_triple_discount: Migration to 17.0 May 28, 2024
@@ -0,0 +1 @@
odoo-addon-account_invoice_triple_discount @ git+https://github.com/OCA/account-invoicing.git@refs/pull/1626/head#subdirectory=account_invoice_triple_discount
Copy link
Contributor

Choose a reason for hiding this comment

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

@Boxnia

Suggested change
odoo-addon-account_invoice_triple_discount @ git+https://github.com/OCA/account-invoicing.git@refs/pull/1626/head#subdirectory=account_invoice_triple_discount
odoo-addon-account_invoice_triple_discount @ git+https://github.com/OCA/account-invoicing.git@refs/pull/1626/head#subdirectory=setup/account_invoice_triple_discount

Copy link
Contributor

Choose a reason for hiding this comment

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

Ugh changed for v17. Ok

@Boxnia Boxnia force-pushed the 17.0-mig-sale_triple_discount branch from 609f887 to 578aae9 Compare May 29, 2024 11:50
@Boxnia
Copy link
Author

Boxnia commented May 29, 2024

@rousseldenis I have changedthe test-requirement but the bug is the same.

Thanks

tafaRU and others added 26 commits June 5, 2024 12:43
OCA Transbot updated translations from Transifex

[UPD] Update sale_triple_discount.pot
Currently translated at 100,0% (5 of 5 strings)

Translation: sale-workflow-10.0/sale-workflow-10.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_triple_discount/nl_NL/
Currently translated at 100.0% (5 of 5 strings)

Translation: sale-workflow-10.0/sale-workflow-10.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_triple_discount/nl_NL/
…onsistency

[FIX] sale_triple_discount: Invalidating the cache of specific records before recomputing price and discount

[UPD] Update sale_triple_discount.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_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_triple_discount/
[UPD] Update sale_triple_discount.pot
[UPD] Update sale_triple_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_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_triple_discount/
[UPD] Update sale_triple_discount.pot

[UPD] README.rst
Currently translated at 100.0% (11 of 11 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_triple_discount/it/

[UPD] README.rst

[UPD] README.rst
Currently translated at 0.0% (0 of 11 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_triple_discount/fr/
[UPD] Update sale_triple_discount.pot

[UPD] README.rst
Update translation files

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

Translation: sale-workflow-15.0/sale-workflow-15.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_triple_discount/
weblate and others added 13 commits June 5, 2024 12:43
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_triple_discount/es_MX/
Currently translated at 100.0% (12 of 12 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_triple_discount/it/
Currently translated at 100.0% (12 of 12 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_triple_discount/es/
Currently translated at 100.0% (12 of 12 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_triple_discount/it/
Currently translated at 100.0% (12 of 12 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_triple_discount/de/
Copy link

@traitrantrobz traitrantrobz left a comment

Choose a reason for hiding this comment

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

@Boxnia I don't know the reason why i cannot edit the discount1-2-3 field on sale the order line. It gets reset after I edit it. Please deouble-check it. Thank you!

@grindtildeath
Copy link
Contributor

@Boxnia Thanks for the mig, I guess we'll want to bring #3157 in v17.0 from the get go, although it's not merged in 16.0 yet. We discussed the same for account_invoice_triple_discount here: OCA/account-invoicing#1626 (comment)

Copy link

@dalonsod dalonsod left a comment

Choose a reason for hiding this comment

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

See comments

this method is called multiple times.
Updating the cache provides consistency through re-computations."""
prev_values = dict()
self.invalidate_model(self._discount_fields(), self.ids)
Copy link

@dalonsod dalonsod Nov 12, 2024

Choose a reason for hiding this comment

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

@Boxnia @traitrantrobz regarding to issue commented at #3157 (review) I've simply removed this line and it worked for me, could you check?

Suggested change
self.invalidate_model(self._discount_fields(), self.ids)

Comment on lines +121 to +124
self.invalidate_model(
self._discount_fields(),
[line.id for line in list(prev_values.keys())],
)

Choose a reason for hiding this comment

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

I don't know if it is now needed. Anyway, invalidate_model signature for v17 seems to be different than used (and invalidate_recordset should be used instead), could you check?

@dalonsod
Copy link

Superseded by #3406

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.