Skip to Content
Menu
v 15.0 Third Party 36
Download for v 15.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 21
Technical Name odoo_odex
LicenseLGPL-3
Websitehttps://github.com/DIOR27/odex
Versions 15.0 16.0 17.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 21
Technical Name odoo_odex
LicenseLGPL-3
Websitehttps://github.com/DIOR27/odex
Versions 15.0 16.0 17.0

Odex - The Odoo RegEx Module

Odex is a simple but powerful module for managing regular expressions in fields.

This Odoo module customizes the behavior of the Char field by introducing a new regex parameter. It allows you to define a regular expression pattern that the field value must match. If the value provided does not conform to the specified pattern, a ValidationError is raised.

Usage

To use odex, simply add the parameter regex together with the string to be evaluated in the char field (fields.Char) of your model, for example:

name = fields.Char(string=_(“Name”), regex=r"^[A-Z0-9]+$")

When not matching the regular expression, the system will display a ValidationError indicating the value and the expected expression.

Note: The regex parameter is case-sensitive.

If you like my work please leave me a star on GitHub, I'd really appreciate it.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.