Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5075 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 25
2100
1
thg 4 25
1582
0
thg 10 24
1279
2
thg 5 24
4118
0
thg 4 24
1406