Skip to content

[17.0][MIG] sale_triple_discount: Migration to 17.0#3157

Closed
Boxnia wants to merge 39 commits intoOCA:17.0from
Ontinet-com:17.0-mig-sale_triple_discount
Closed

[17.0][MIG] sale_triple_discount: Migration to 17.0#3157
Boxnia wants to merge 39 commits intoOCA:17.0from
Ontinet-com:17.0-mig-sale_triple_discount

Conversation

@Boxnia
Copy link
Copy Markdown

@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 No newline at end of file
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

@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())],
)
Copy link
Copy Markdown
Contributor

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 dalonsod mentioned this pull request Nov 12, 2024
3 tasks
@dalonsod
Copy link
Copy Markdown
Contributor

Superseded by #3406

@gurneyalex gurneyalex closed this Jan 23, 2025
@hildickethan hildickethan deleted the 17.0-mig-sale_triple_discount branch September 23, 2025 10:53
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.