コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4994 ビュー

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...)

最善の回答

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

関連投稿 返信 ビュー 活動
3
7月 15
10454
1
3月 16
2450
1
3月 15
4525
2
3月 15
2762
1
3月 15
3917