They may have the same id ?
Id should be uniq by modules.
[email protected] wrote:
This post is related to http://openerp.com/forum/topic8892.html
I'm tryin to upload csv data into OpenErp 5.0.0 RC3
For simplicity a Partner file and an (custom) order file.
Orders have a relation to partners.
The first 2500 orders load fine.
After that i get the exception
IntegrityError: insert or update on table "order_history" violates foreign key constraint
"order_history_partner_id_fkey"
ERROR:web-services:[15]: DETAIL: Key (partner_id)=(161932) is not present in table "res_partner".
The relation between the order and partners is correct in the files however.
Several rows will work for partnerid A but another row will fail for it.
Looking at the intermediate tables (ir_model...) and the code the partnerid
used 161932 is not a partnerid but an orderid!
Of course looking this up in the partner table has an error as result.
I suspect that something goes wrong in some cases when saving the order
relations to the intermediate tables.
In the orm.py code in the process_lines method i can see that the relation is
already loaded wrong.
I can't find any logic in what makes an order row incorrectly linked to an
order instead of to a partner.
Any ideas?
-------------------- m2f --------------------
--
http://www.openerp.com/forum/viewtopic.php?p=28706#28706
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users
--
Fabien Pinckaers
CEO Tiny - OpenERP Editor
Chaussée de Namur 40
B-1367 Grand-Rosière
Belgium
Phone: +32.81.81.37.00
Fax: +32.81.73.35.01
Web: http://openerp.com
Great Achievements Start With Tiny Investments
-- Marty, 2005
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users