Odoo Help


[v7] -> [v8] After importing products and updating, "bad query: delete from product_category where id IN "

Franz Palfrader
on 8/15/14, 7:14 AM 947 views

Hello, I have imported all products from V7 to V8 and I have some problems/conflicts while --update=all 

It seems as though, some problems are in the internal and public categories. Some errors here:

2014-08-13 16:29:50,100 3854 INFO db08 openerp.addons.base.ir.ir_model: Deleting 271@product.public.category
2014-08-13 16:29:50,113 3854 INFO db08 openerp.addons.base.ir.ir_model: Deleting 270@product.public.category
2014-08-13 16:29:50,119 3854 INFO db08 openerp.addons.base.ir.ir_model: Deleting 199@product.category
2014-08-13 16:29:50,134 3854 INFO db08 openerp.addons.base.ir.ir_model: Deleting 198@product.category
2014-08-13 16:29:50,137 3854 ERROR db08 openerp.sql_db: bad query: delete from product_category where id IN (198)
Traceback (most recent call last):
  File "/opt/odoo/odoo-server/openerp/sql_db.py", line 230, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "categ_id" violates not-null constraint
DETAIL:  Failing row contains (3362, null, null, 1.00, null, null, \x6956424f5277304b47676f414141414e5355684555674141415a7341414147..., 1, fixed, 1, null, 2014-07-24 16:11:40.093323, 1.000, 1, f, null, null, 1, null, 1, consu, null, null, null, 2014-07-26 00:48:42.963703, t, null, t, \x6956424f5277304b47676f414141414e535568455567414141494141414143..., PORTO FRANCO, null, \x6956424f5277304b47676f414141414e535568455567414141454141414142..., null, null, f, 7, f, f, null, t, null, null, null, 1068, f, null, 1, 1, null, null, no-message, no-message).
CONTEXT:  SQL statement "UPDATE ONLY "public"."product_template" SET "categ_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "categ_id""

I see that some categories have other id's, can this be part of the problem?

"product.product_category_100","Category One"
"__export__.product_category_200","Category Two"



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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/15/14, 7:14 AM
Seen: 947 times
Last updated: 3/16/15, 8:10 AM