Odoo Help

Welcome!

This community 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.

0

How can I disable "mrp_bom_bom_qty_zero" constraint?

By
philjun
on 9/19/14, 5:27 AM 493 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?

Best,

0
philjun
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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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