Skip to content

[19.0][MIG] sale_tier_validation: Migration to 19.0#3968

Open
niboo-vli wants to merge 43 commits intoOCA:19.0from
niboo-odoo:19.0-mig-sale_tier_validation
Open

[19.0][MIG] sale_tier_validation: Migration to 19.0#3968
niboo-vli wants to merge 43 commits intoOCA:19.0from
niboo-odoo:19.0-mig-sale_tier_validation

Conversation

@niboo-vli
Copy link
Copy Markdown

No description provided.

osi-mgosai and others added 30 commits October 24, 2025 17:47
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/
celm1990 and others added 13 commits October 24, 2025 17:47
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/
@bosd
Copy link
Copy Markdown
Contributor

bosd commented Jan 6, 2026

@niboo-vli Thanks for the migration. Can you please add a test-requirements.txt ?

git+https://github.com/em230418/tier-validation@19.0-mig-base_tier_validation#subdirectory=base_tier_validation

So it depends on: OCA/tier-validation#1

@OpenCode
Copy link
Copy Markdown
Contributor

OpenCode commented Feb 4, 2026

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).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AGPL-3.0 or LGPL-3.0?

@bosd
Copy link
Copy Markdown
Contributor

bosd commented Feb 10, 2026

I think you can create a PR to migrate the module directly in https://github.com/OCA/tier-validation

Looks like there already is one: OCA/tier-validation#9

Copy link
Copy Markdown

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

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:

  1. License mismatch in test file (already flagged by @is-ife): tests/test_tier_validation.py header says LGPL-3.0 but the manifest declares AGPL-3. Should be AGPL-3.0 to match.

  2. pricelist_id in test setup: The test creates a sale order with "pricelist_id": cls.customer.property_product_pricelist.id. In Odoo 17+, pricelist handling on res.partner changed. Verify that property_product_pricelist still resolves correctly in 19.0 and that the pricelist_id field is still required on sale.order. If not, this line can be dropped.

  3. Translation function: The self.env._() pattern in reports/sale_report.py is 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).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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,
}
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@victoralmau
Copy link
Copy Markdown
Member

Please, cherry-pick #4197 to commit history before migration commit.

@rousseldenis
Copy link
Copy Markdown
Contributor

@niboo-vli Could you attend comments ?

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.