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
