Skip to content

[19.0][IMP] base_tier_validation_formula: code widget on python expressions#28

Open
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-imp-base_tier_validation_formula-ui
Open

[19.0][IMP] base_tier_validation_formula: code widget on python expressions#28
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-imp-base_tier_validation_formula-ui

Conversation

@bosd

@bosd bosd commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Apply widget="code" with options="{'mode': 'python'}" to reviewer_expression, so the Python Expression reviewer field gets the same syntax-highlighted editor as python_code.
  • Move python_code into its own full-width group (col="4" / colspan="4") so the code editor is no longer squeezed to half-width inside the default 2-column Apply On group.
  • Add placeholder hints on both fields listing the available locals (rec, expected return type) for the first time a user clears the default.

Test plan

  • Open a tier.definition record, set Review Type = Python Expression: the Review Expression field renders with the code widget (syntax highlighting, monospace) and takes full sheet width.
  • Set Definition Type = Formula or Domain & Formula: the Tier Definition Expression field is shown in a full-width code editor.
  • Clear each expression: the placeholder lists the available locals.
  • Switch Review/Definition Type back to a non-expression value: the fields hide as before.

Before:
image

After:
image

@OCA-git-bot OCA-git-bot added mod:base_tier_validation_formula Module base_tier_validation_formula series:19.0 labels May 13, 2026
- 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.
@bosd bosd force-pushed the 19.0-imp-base_tier_validation_formula-ui branch from 98275ec to 07efa40 Compare June 5, 2026 21:17
@bosd

bosd commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Heads up @santostelmo: I force-pushed a tiny housekeeping change — dropped the manual __manifest__.py version bump (per @LoisRForgeFlow's request across all open PRs; ocabot bumps on merge). No functional change to the code you approved. CI is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:base_tier_validation_formula Module base_tier_validation_formula series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants