Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

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

Avatar
Buang

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

Jawaban Terbai

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

Avatar
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
3
Jul 15
10259
1
Mar 16
2450
1
Mar 15
4430
2
Mar 15
2638
1
Mar 15
3799