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

Is decimal precision causing this import error? How do I change precision on a system-wide level?

By
Jeff Beidler
on 7/18/14, 2:36 PM 1,053 views

While importing BoM records in chunks of 1,000, everything was going along swimmingly, until about record 10,000.  At that point, I received this error:

new row for relation "mrp_bom" violates check constraint "mrp_bom_bom_qty_zero" DETAIL: Failing row contains (18480, 1, 2014-07-18 17:53:15.396004, 2014-07-18 17:53:15.396004, 1, null, null, 1, null, null, 0.000, null, 1, t, 0, HDL081, null, 1, null, 29253, 2928, null, normal). at row 33

Looking at my import file, I can't find any difference between the offending record and any others.  There is a non-zero value (0.0004) in the column for quantity required, so I'm thinking that maybe the error is in something that OpenERP is filling in automagically?  Or perhaps there is some sort of rounding applied by OpenERP, and since the value is so small, it considers it zero?

Please word your question with more detail - forcing readers to open your question to learn if they can help reduces the chances it will be answered.

Bista Solutions US, Ray Carnes
on 7/18/14, 2:48 PM

What happens when you try to enter this same data via the UI ?

Bista Solutions US, Ray Carnes
on 7/18/14, 2:51 PM
0
Jeff Beidler
On 7/18/14, 4:16 PM

It does appear that the value of 0.0004 was rounded to 0.000.  See the 5th value before the part name "HDL081" in the error.  After some googling, I have seen multiple posts that say to to go "Settings-->Technical-->Database-->Decimal Accuracy", but that option wasn't present when I looked.  Turns out that you have to go into the User permissions settings and enable the "Technical Features" option first, then you will be able to set decimal precision. 

Hope this helps someone else with the same problem!

There is also a decimal precision on the unit of measure. Not sure if this would have a similar effect on imports.

Matt Taylor
on 11/11/14, 6:12 PM

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

2 follower(s)

Stats

Asked: 7/18/14, 2:36 PM
Seen: 1053 times
Last updated: 3/16/15, 8:10 AM