Is there some good simple way to limit what values can be entered in specific field?
For example I want that in my field you could only enter positive values. I could do that by overriding that models create and write methods and checking if that specific field value is positive. If not I would throw exception. But maybe there is some simpler better way like it is with required attribute or similar?
For exmaple is there some similar way like:
'my_field': fieds.integer('My field' limit=[('val', '>=', 0)])
P.S. How can I change my text format look like code format in this new odoo forum?..