openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #22044
[Bug 1091184] Re: Importing csv file with children of existing parent gives error
** Changed in: therp-backports
Milestone: 6.1-maintenance => 7.0-maintenance
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1091184
Title:
Importing csv file with children of existing parent gives error
Status in OpenERP Server:
Confirmed
Status in Therp Backports:
Fix Released
Bug description:
I have a csv files with product categories, that should be linked to
the main category (the one with xml ID cat0). I try to import the csv
file trough the user interface. This results in in error, saying that
None can not be linked to an int.
The csv file looks like this:
id,parent_id/id,name
cat_bevestiging,product.cat0,Bevestiging
cat_elektra,product.cat0,Elektra
cat_gereedschap,product.cat0,Gereedschap
The import creates the first record (committed to the database), then
returns an error, and the rest of the import fails.
So apart from the original error, there is the error that a partial
import is committed.
The error occurs during computation of the parent_left, parent_right
values. Because the main category, does not have parent_left or
parent_right set in the database. (I think this is an error too, by
the way).
The import error can be easily solved by patching one line in orm.py.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1091184/+subscriptions
References