Remove Unique Sql Constraints in Odoo

Hello Odooers, Odoogig and Odoo Lovers,

In this Odoo Tips Tutorial, I would like to explain how to remove Unique _sql_constraints in Odoo

  • If you don’t know what is Unique _sql_constraints and how to add it, then first refer this article
  • You can remove Unique _sql_constraints from model by inheriting particular model in odoo

Syntax

Example

 

  • So here, CHECK(1=1) will help to bypass the constrain on the field
  • Using this way you can remove _sql_constraints from any model

 

 

 

LEAVE A REPLY

Leave a Reply

Your email address will not be published. Required fields are marked *