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
Copy link
Copy Markdown
Contributor

@bosd bosd commented May 13, 2026

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

- 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.
@OCA-git-bot OCA-git-bot added mod:base_tier_validation_formula Module base_tier_validation_formula series:19.0 labels May 13, 2026
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