Skip to content

[20.0][MIG] base_tier_validation_formula: Migration to 20.0 - #2

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

alan196 merged 335 commits into
Jarsa:20.0from
Jarsa-dev:20.0-mig-base_tier_validation_formula

Conversation

@alan196

@alan196 alan196 commented Oct 10, 2026

Copy link
Copy Markdown

Migration of base_tier_validation_formula 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; summary made one-line (pylint-odoo manifest-summary-multiline).
  • pre-commit auto fixes (XML header casing), regenerated README.
  • No functional change was required: the module only extends tier.definition, tier.review and tier.validation with Python expressions, and every anchor it relies on (onchange_review_type, evaluate_tier, _get_reviewer_fields, _get_reviewers, the tier.definition form xpaths) still exists in the 20.0 base module.

How it was tested

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

  • 7 tests, 0 failed, 0 error(s), no ERROR/CRITICAL lines or tracebacks, no deprecation warnings.
  • pre-commit (repo 20.0 config) passes without reformatting anything.

Assisted-by: Claude Fable 5.1

OCA-git-bot and others added 30 commits October 8, 2026 14:39
Currently translated at 77.1% (81 of 105 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/it/
Currently translated at 77.1% (81 of 105 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/it/
Currently translated at 77.1% (81 of 105 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/it/
- Add _check_state_from_condition() method to better clarify the code and to be able to inherit it by another module.
- Add _add_tier_validation_x() methods to better clarify the code and to be able to inherit it by another module.
- Add name to th + td from ReviewsTable for a better selector if another module needs it.

TT43351
Currently translated at 77.1% (81 of 105 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/it/
Currently translated at 100.0% (104 of 104 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/es/
A method for deciding whether or not to remove related reviews is added.

TT43351
Currently translated at 100.0% (109 of 109 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/es/
Currently translated at 100.0% (109 of 109 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/fr/
…_tier_validation_model_names()

Even if they are models that are only used in tests, it is necessary to add the tier.validation.tester
and tier.validation.tester2 to the tier.definition's _get_tier_validation_model_names() method.

TT33369
…te fields

Before this commit, in a database with many records candidates for applying reviews, fields with a defined search function were very slow because the search was performed over all records with these states.
After this commit, first filter only records with review_ids set, which significantly reduces performance by more than 10X!!!
Currently translated at 72.9% (81 of 111 strings)

Translation: server-ux-16.0/server-ux-16.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_tier_validation/it/
etobella and others added 28 commits October 10, 2026 08:31
[UPD] Update base_tier_validation_formula.pot
- Include context keys for avoiding mail operations overhead.
…oaded

With the changes introduced in odoo/odoo@de056cc#diff-b37c7fd5520c97a29ddc59495779e7be61a66e15e85603928e27b3affb9dc31f, an error was occurring because the change validation on the model was being performed before tearDownClass was executed. Therefore, it has been modified so that the mock changes are applied in each test and cleaned up after each test. This way, the error will no longer appear and the test will run normally.
Currently translated at 100.0% (17 of 17 strings)

Translation: tier-validation-19.0/tier-validation-19.0-base_tier_validation_formula
Translate-URL: https://translation.odoo-community.org/projects/tier-validation-19-0/tier-validation-19-0-base_tier_validation_formula/nl/
- Apply widget="code" with python mode to reviewer_expression so the
  Python Expression reviewer field gets syntax-highlighted editing,
  matching the treatment of python_code.
- Move python_code into its own full-width (col="4"/colspan="4") group
  so the code editor is no longer squeezed to half-width inside the
  default 2-column "Apply On" group.
- Add placeholder hints listing the available locals on both fields.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: tier-validation-19.0/tier-validation-19.0-base_tier_validation_formula
Translate-URL: https://translation.odoo-community.org/projects/tier-validation-19-0/tier-validation-19-0-base_tier_validation_formula/
Currently translated at 89.4% (17 of 19 strings)

Translation: tier-validation-19.0/tier-validation-19.0-base_tier_validation_formula
Translate-URL: https://translation.odoo-community.org/projects/tier-validation-19-0/tier-validation-19-0-base_tier_validation_formula/nl/
Currently translated at 100.0% (19 of 19 strings)

Translation: tier-validation-19.0/tier-validation-19.0-base_tier_validation_formula
Translate-URL: https://translation.odoo-community.org/projects/tier-validation-19-0/tier-validation-19-0-base_tier_validation_formula/it/
No functional change was needed: the module only extends tier.definition,
tier.review and tier.validation with Python expressions. Manifest summary
made one-line to satisfy pylint-odoo (manifest-summary-multiline).

Assisted-by: Claude Fable 5.1
@alan196
alan196 force-pushed the 20.0-mig-base_tier_validation_formula branch from 7108519 to 7bd7aca Compare October 10, 2026 14:31
@alan196
alan196 merged commit 7bd7aca into Jarsa:20.0 Oct 10, 2026
4 checks passed
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.