Yes it is possible using odoo constraint, Soon you will get this discussion too. Stay with us. By the way thanks you shared playlist in your account :) Keep sharing such amazing topics to this world :) Thank You
By default Odoo don't have option to remove sql constraint directly. So here you have to follow any of below option. 1) Find that sql constraint name and remove from postgres database directly. 2) Create new module and here inherit the same model and try to override that sql constraint like this. _sql_constraints = [('your_sql_constraint_name', 'CHECK(1=1)', 'Override this constraint to by pass previous logic!')]
Nice one, Is it possible to add Odoo level constraint and if yes how ?
Yes it is possible using odoo constraint, Soon you will get this discussion too.
Stay with us.
By the way thanks you shared playlist in your account :)
Keep sharing such amazing topics to this world :)
Thank You
Hi guy, can we remove an existing sql_constraint when inheriting a model?
By default Odoo don't have option to remove sql constraint directly. So here you have to follow any of below option.
1) Find that sql constraint name and remove from postgres database directly.
2) Create new module and here inherit the same model and try to override that sql constraint like this.
_sql_constraints = [('your_sql_constraint_name', 'CHECK(1=1)', 'Override this constraint to by pass previous logic!')]