[19.0][MIG] sale_tier_validation: Migration to 19.0#3968
[19.0][MIG] sale_tier_validation: Migration to 19.0#3968
Conversation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_tier_validation/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-13.0/sale-workflow-13.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_tier_validation/
Currently translated at 100.0% (13 of 13 strings) Translation: sale-workflow-13.0/sale-workflow-13.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_tier_validation/zh_CN/
Currently translated at 100.0% (13 of 13 strings) Translation: sale-workflow-13.0/sale-workflow-13.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_tier_validation/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-14.0/sale-workflow-14.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_tier_validation/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_tier_validation/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_tier_validation/
Currently translated at 100.0% (19 of 19 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_tier_validation/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_tier_validation/
Currently translated at 100.0% (20 of 20 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_tier_validation/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-17.0/sale-workflow-17.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_tier_validation/
Currently translated at 100.0% (22 of 22 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_tier_validation/es/
Currently translated at 100.0% (22 of 22 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_tier_validation/it/
Currently translated at 100.0% (22 of 22 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_tier_validation Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_tier_validation/sv/
|
@niboo-vli Thanks for the migration. Can you please add a So it depends on: OCA/tier-validation#1 |
|
I think you can create a PR to migrate the module directly in https://github.com/OCA/tier-validation |
| @@ -0,0 +1,83 @@ | |||
| # Copyright 2020 Sergio Teruel <sergio.teruel@tecnativa.com> | |||
| # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | |||
Looks like there already is one: OCA/tier-validation#9 |
alexey-pelykh
left a comment
There was a problem hiding this comment.
Thanks for porting this module.
The main blocker right now is the unreleased dependency: base_tier_validation has not been merged to 19.0 yet on OCA/server-ux (see server-ux#1234 -- tests pass but pre-commit still fails there). This explains both CI test failures (test with Odoo and test with OCB).
Once that dependency lands, there are a few things to address in this PR:
-
License mismatch in test file (already flagged by @is-ife):
tests/test_tier_validation.pyheader saysLGPL-3.0but the manifest declaresAGPL-3. Should beAGPL-3.0to match. -
pricelist_idin test setup: The test creates a sale order with"pricelist_id": cls.customer.property_product_pricelist.id. In Odoo 17+, pricelist handling onres.partnerchanged. Verify thatproperty_product_priceliststill resolves correctly in 19.0 and that thepricelist_idfield is still required onsale.order. If not, this line can be dropped. -
Translation function: The
self.env._()pattern inreports/sale_report.pyis correct for 19.0 -- good catch on updating that from the 18.0_()import.
Code-wise the module looks solid -- clean model inheritance, proper tier validation hookup via _state_from/_state_to, correct notification subtypes, and adequate test coverage. No issues with the XML views or data files.
Please rebase once base_tier_validation is available on 19.0 and fix the license header.
| @@ -0,0 +1,83 @@ | |||
| # Copyright 2020 Sergio Teruel <sergio.teruel@tecnativa.com> | |||
| # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | |||
There was a problem hiding this comment.
License should be AGPL-3.0 to match the module manifest ("license": "AGPL-3"). Currently says LGPL-3.0.
| ], | ||
| "pricelist_id": cls.customer.property_product_pricelist.id, | ||
| } | ||
| ) |
There was a problem hiding this comment.
In Odoo 17+, property_product_pricelist on res.partner was refactored. Verify this still resolves correctly in 19.0. If pricelist_id is no longer required on sale.order, you can drop this line entirely -- other 19.0 modules (e.g. sale_exception) create the pricelist explicitly rather than relying on the partner property.
|
Please, cherry-pick #4197 to commit history before migration commit. |
|
@niboo-vli Could you attend comments ? |
No description provided.