Skip to Content
Mandatory Field Highlight
mandatory_field_highlight

Mandatory Field Highlight

Colours required fields with settings-defined colours.

  • Odoo 17
  • Tools & Administration
  • 17.0.1.0.0
1

Overview

Users often miss required fields until a save error appears. This module adds colour settings for the field background and the four margins, and a script and stylesheet apply them to every mandatory field in the backend. Values are read through a public config route, so they apply immediately after saving. It depends on web and contacts and helps all data-entry users.

2

Usage steps

  1. 1

    Open general settings

    Go to Settings and find the block added by the module. It shows five colour fields. Only users with settings rights see it.

    • Model: res.config.settings
    • Five colour fields
  2. 2

    Choose the field colours

    Pick Field Background Color and the left, right, top and bottom margin colours. Save the settings. The values are stored as system parameters.

    • Field Background Color
    • Margin Left/Right/Top/Bottom Color
  3. 3

    Values load in the client

    On page load the script calls the config_params route and receives the colours. It sets CSS variables for the field style. No reload of the server is needed.

    • Route /mandatory/config_params
    • CSS variables via field.scss
  4. 4

    See required fields highlighted

    Open any form with required fields and they appear with the chosen colours. Users know at a glance what to fill. Change the colours again to adapt to dark or light themes.

    • Works on all forms
    • Adjust colours per preference
4

Roles

Benefiting roles
Role
System administrator
All backend users
5

Dependencies

Back to version applications

Want to know more or try this app? Contact us

We can arrange a demo or a trial and answer your questions about Mandatory Field Highlight.

Contact us