Skip to content

[20.0][MIG] sale_tier_validation: Migration to 20.0 - #3

Merged
alan196 merged 55 commits into
Jarsa:20.0from
Jarsa-dev:20.0-mig-sale_tier_validation
Oct 10, 2026
Merged

alan196 merged 55 commits into
Jarsa:20.0from
Jarsa-dev:20.0-mig-sale_tier_validation

Conversation

@alan196

@alan196 alan196 commented Oct 10, 2026

Copy link
Copy Markdown

Migration of sale_tier_validation to 20.0.

Depends on #1 (base_tier_validation, mirror of OCA#94). This branch is rebased on top of that one, so the first commits belong to that PR; do not merge before it.

Changes

  • History ported with oca-port from 19.0.
  • __manifest__.py: version 20.0.1.0.0.
  • ruff RUF012 noqa on the mutable class attributes (_inherit, _state_from, _state_to), same pattern as base_tier_validation.
  • Tests: BaseCommon in 20.0 runs every test as a dedicated test user instead of the superuser, so the test class declares _test_user_groups = ("base.group_system", "sales_team.group_sale_manager") (the test confirms orders and toggles the company-level print block). Without it the tests fail with AccessError on sale.order.
  • pre-commit auto fixes (XML header casing, id before model in a record), regenerated README.
  • No other functional change was needed: the action_confirm buttons, my_sale_orders_filter, the proforma_configuration setting and the sale.report_saleorder template extended by the module still exist in 20.0.

How it was tested

Fresh database with demo data on Odoo 20.0, -i sale_tier_validation --test-enable --test-tags /sale_tier_validation:

  • 5 tests, 0 failed, 0 error(s), no ERROR/CRITICAL lines or tracebacks, no deprecation warnings.
  • Manual end-to-end check of the sales validation flow in odoo-bin shell with real users (salesperson + reviewer): confirmation blocked before validation, request_validation leaves the order pending for the reviewer only, reviewer validates and the salesperson confirms (state = sale), a rejected order cannot be confirmed, the print block raises when enabled, and the reviewer's systray counter shows the pending review. Messages render the Material icons (oi).
  • pre-commit (repo 20.0 config) passes without reformatting anything.

Assisted-by: Claude Fable 5.1

@jarsabot

Copy link
Copy Markdown
    **WARNING**: Could not link to Odoo task. Record ID not found in the title of the MR, supported formats:
{ record type }#{ number }

Available types: 'task#', 't#' (case insensitive)

Examples:

  • task#123

  • i#123

@alan196
alan196 force-pushed the 20.0-mig-sale_tier_validation branch from 12d4a38 to 719490e Compare October 10, 2026 14:31
osi-mgosai and others added 28 commits October 10, 2026 09:13
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/
Ivorra78 and others added 27 commits October 10, 2026 09:13
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/
Currently translated at 100.0% (28 of 28 strings)

Translation: sale-workflow-18.0/sale-workflow-18.0-sale_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_tier_validation/nl/
Currently translated at 100.0% (28 of 28 strings)

Translation: sale-workflow-18.0/sale-workflow-18.0-sale_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_tier_validation/ja/
- Add ruff RUF012 noqa on the mutable class attributes (_inherit, _state_from,
  _state_to), as done in base_tier_validation.
- Tests: BaseCommon now runs each test as a dedicated test user instead of the
  superuser, so declare _test_user_groups (sales manager + system, the test
  confirms orders and toggles the company print-block setting). Without it
  the tests fail with AccessError on sale.order.
- No other functional change needed: the sale.order form buttons, search
  filters, settings block and report template extended by the module still
  exist in 20.0.

Assisted-by: Claude Fable 5.1
@alan196
alan196 force-pushed the 20.0-mig-sale_tier_validation branch from 719490e to 5399a86 Compare October 10, 2026 15:13
@alan196
alan196 merged commit 5399a86 into Jarsa:20.0 Oct 10, 2026
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.