If you want to use a constraint on a field, you can define as that:
For example:
def _check_date(self, cr, uid, ids):
for obj in self.browse(cr, uid, ids):
if obj.parameter != something:
return False
return True
_constraints = [
(_check_data, "There is an error !", ['field1', 'field2']),
]
------------------------
OpenERP Developer
-------------------- m2f --------------------
--
http://www.openerp.com/forum/viewtopic.php?p=29174#29174
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users