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

Understand the categories/public-categories

By
Franz Palfrader
on 8/20/14, 10:32 AM 1,370 views

I have erros while import/backup the database, see the error

<<<
2014-08-20 13:44:51,326 6065 ERROR db_name openerp.sql_db: bad query: INSERT INTO "product_public_category" ("id", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('product_public_category_id_seq'), 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
Traceback (most recent call last):
  File "/opt/odoo/openerp/sql_db.py", line 230, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint
DETAIL:  Failing row contains (999, 1, null, 2014-08-20 13:44:51.203247, null, null, null, null, 1, null, 2014-08-20 13:44:51.203247).
>>>

Here, on Runbot, I created the first two categories and export it to CSV. 

<<<
"id","name","parent_id/id"
"__export__.product_public_category_28","Base-Category",""
"__export__.product_public_category_29","Sub-Category","__export__.product_public_category_28"
"product.case","Case","product.Components"
"product.Components","Components","product.computers"
"product.Computer_all_in_one","Computer all-in-one","product.sub_computers"
"product.sub_computers","Computers","product.computers"
"product.computers","Computers",""
>>>

On my local DB I have the db-values like these:

<<<
"id","name","parent_id/id"
"__export__.product_public_category_365","Category One","website_sale.367"
"__export__.product_public_category_364","Category Two","website_sale.367"
>>>

website_sale.xxx
__export__.product_public_category_xxx
product.xxx

hm...

may dirty, but that's why I use two diff. import method: - direct injection with sql - xml (this is also easy to mistake) the third one is the excel read directly, and create the orm objects. (this method is quite difficult and very slow...)

klacus
on 8/20/14, 11:16 AM
0
Marek Mosiewicz
On 8/26/14, 9:33 AM

The problem is that import tries to insert value into categories without name value which is required.

Maybe it tries to import these lines:

website_sale.xxx
__export__.product_public_category_xxx
product.xxx

I think also the languages/translations can play an explicit or underlying role

Franz Palfrader
on 8/26/14, 10:36 AM

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: 8/20/14, 10:32 AM
Seen: 1370 times
Last updated: 3/16/15, 8:10 AM