21. Model Constraints - Python Constraints

Adding Data files in your Module

Odoo helps you to set validations to recordsets with the help of python and model constraints. Mainly there are two ways in which constraints can be set to variants in Odoo. They are python and sql constraints.
Basically python constraints are set in odoo using the class decorator api.constrains() which takes in the field name as arguments and applies the validation conditions to the fields specified inside the method.

whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message