+1 vote
42 views

Using odoo 12, I'm trying to make some custom fields adapted to contain specific values with regular expression Eg: 'NN C NNNNNNN' (N:numeric, C:Character).

I'm trying to make these fields contain some default values (like spaces/- ...) and allow user inputs according to regex.

Just like Key input in picture bellow:

example

in Back-end by (10.5k points) | 42 views

1 Answer

0 votes

Hi Khayreddine,

You can define -for example- five fields in python and organize them one next to the other in xml view separates by "-", and in create and write functions combine them into one field of type string.
Otherwise, you need to create a new field widget in js, check the way here.

by (3.7k points)
edited by
202 questions
178 answers
34 comments
111,038 users