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

"min_qty" column error preventing importing products

By
Matt Dieball
on 5/30/13, 6:37 PM 1,635 views

We are trying to import our products into the database but we are getting the error:

null value in column "min_qty" violates not-null constraint

We tried making a new column named min_qty, which was not detected. I tried selecting the product_min_qty field from the list, but that doesn't work either. There is no min_qty column to be selected. Is this a problem with the import verification, or is there a setting somewhere that we are missing?

Thanks

0

michel Guénard

--michel Guénard--
1033
| 5 5 8
VIROFLAY, France
--michel Guénard--

VP operations & finance Social entrepreneur Certified Public Accountant Past Chief internal auditor

michel Guénard
On 5/31/13, 7:24 AM

The column name that I have added to my csv file when importing new products from a supplier catalogue is

SUPPLIER / MINIMAL QUANTITY

The minimal quantity was imported as desired

0

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 5/31/13, 6:02 AM

Before we can fix the issue, can you tell us how you tried to add a new column? Given your text, I think you used openERP to create a new column 'min_qty' on the table 'product'. If so, the name of the column should be 'x_min_qty', which is forced by openERP when adding it.

Is it possible for you to see which fields are defined within postgreSQL on the table product_product and product_template? For example within webmin (on Linux), or pgadmin (linux and windows).

A better way of adding new fields to a table/model is to use custom modules, and define the fields in the python code.

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

0 follower(s)

Stats

Asked: 5/30/13, 6:37 PM
Seen: 1635 times
Last updated: 3/16/15, 8:10 AM