my code for constraint and sql constraint is at below:
def testing(self, cr, uid, vals, context=None):
return False;
_sql_constraints = [
('name_uniq', 'unique (name)','testing !')
]
_constraints = [(testing,'testing',['name'])]
when I save the form, it displays nothing so I think there is something wrong.
also, where do I define 'name_uniq'? I have read few example and still have no idea for it.