Odoo Help


How can I disable "mrp_bom_bom_qty_zero" constraint?

on 9/19/14, 5:27 AM 795 views

For certain reasons, I want to allow BoM-component to appear in the Bom list with a quantity set to zero. I have edited the mrp.py line 235-236 to skip the qty check and deleted the mrp_bom_qty_zero constraint from the Model Constraint panel in the browser client. Still, when trying to import data where qty=0 appears, I get the error "new row for relation "mrp_bom" violates check constraint "mrp_bom_bom_qty_zero" ". 

Where can I completely disable this constraint?


On 9/19/14, 5:47 AM

I solved the problem myself. The solution was to remove (or re-edit) the constraint from the underlying PostgreSQL database as well.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/19/14, 5:27 AM
Seen: 795 times
Last updated: 3/16/15, 8:10 AM