Hello,
how can we apply sql unique constraint on a Many2one field in .line portion of a form.
_sql_constraints = [
('name_uniq', 'UNIQUE (subject)', 'You can not have two users with the same name !')
]
I wrote this but it is not working for me.
please help.
_sql_constraints = [('name_of_field_unique', 'unique(name_of_field)',
'Error Message')]
is subject your many2one field?
Mailtrack 26/11/19, 11:20:07
how to set unique constraint on field using api