Odoo Help

Welcome!

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

1

How to avoid __export__.product_product_19_26 and that kind of things in the export?

By
ton123
on 5/7/13, 4:23 PM 2,525 views

Exports are very quickly unreadable and not understandable.

In my export I see a lot of these data in the uom and in the categories. Even if the categories are the same the data in the categories is not the same.

Is there a method to export products with usefull data in categories and uom?

2

ton123

--ton123--
1418
| 5 6 9
Lisse, Netherlands
--ton123--
End-User. Installed 6.1.1 on a DS412+, DS211+ and DS113J Synology NAS. Reference installation on Ubuntu 12.04/Samsung Notebook. 12-03-2013 In production for Suppliers and Customers, adresbook. 7 small companies. Testing accounting, document management, import and export. Too much showstoppers I haven't fixed at this moment. 06-05-2013 little progress. Migration to v7 impossible because of missing Dutch localisation modules. What I see working is nice, so further testing and asking. Start testing products and warehouse. Happy with this forum and the community.
ton123
On 5/8/13, 5:44 AM

Thanks to the Answer of Martin H. Bramwell and the comment of Ray Carnes I tested different things and found out what to do. I hope you both don't feel I steel your answer. I only try to explain what to do in small steps and what happens in my own words.

The method to get rid of __export__.product_product_19_26 and that kind of things in the export:

  1. Inspect your export.
  2. If you have this kind of rubbish in your export check the column name.
  3. Often this will be category id or oum id or others or both or more.

For each of these you or your user has made new categories, uom, or other. For reasons I do not understand the database is not ready for export and produces rubbisch in your export.

  1. Make an export of the above found categories, uom or other. If you do for some reason I do not understand the database is made ready for usefull export.

  2. Export again and be happy!

In my tested case the rubbisch has been changed in logical data:

  • Data in uom_id/id was changed in __export__.product_uom_10 /11/12 etc which was not unique and corresponding with the data in the other exported records.
  • Data in uom_po_id/id has been changed in __export__.product_uom_10 /11/12 .
  • Data in categ_id/id has been changed in __export__.product_category_19 /etc..

This is great and for me this is a breaktrough in the problem of export / import!

I recently discovered that all of this is due to a very small bug in export. Like you I have always been exporting dependent data first, and every time I notice 'garbage' I am reminded I need to do this. You can get rid of this problem for good if you make a small change (until the bug is fixed in the release). Then you won't have to export categories or UoM's before products (in your example). https://bugs.launchpad.net/openobject-server/+bug/1194893

Bista Solutions US, Ray Carnes
on 8/9/13, 4:04 PM

@Ray Carnes I visit the url. OK. What do you mean with "You can get rid of this problem for good if you make a small change"? Is there an other easier workaround than I described above?

ton123
on 8/9/13, 7:11 PM

Yes. Fix the bug that the URL references (and provides a diff patch for). This involves editing three lines in openerp/osv/orm.py and restarting your OpenERP server.

Bista Solutions US, Ray Carnes
on 8/12/13, 11:55 PM
1

Martin

--Martin--
1978
| 5 6 8
Cornwall, Canada
--Martin--

Analysing, designing, coding and mentoring since 1975. Kilobytes to terabytes. Punch cards to punchy sites. My OpenERP video series: http://www.youtube.com/playlist?list=PLq7op4J183lX44ZlXPiHxUpRvmmRDtxye My Google Speadsheets --> OpenERP Data Pump project: http://martinhbramwell.github.io/GData_OpenERP_Data_Pump My email (with spaces removed) : mhb . warehouseman @ gmail . com

Martin
On 5/7/13, 4:45 PM

Does this answer help :

Why does my Openerp export rubbish?

If you want more meaningful record identifiers you will have to create them with SQL commands directly in the database in the ir_model_data table.

When exporting OpenERP looks in that table for an alternate key name. If it does not find one it generates an ugly one, like __export__.product_product_19_26.

Recall (from the link Martin references) that if your categories or UoM's have no ID's, then OpenERP will incorrectly generate ID's for them. The way to get them correctly generated is to export the categories and UoM's before the products.

Bista Solutions US, Ray Carnes
on 5/7/13, 7:15 PM

Excellent, Ray. Thanks. I had not ever done that myself, so I forgot about it.

Martin
on 5/7/13, 8:28 PM

Thanks to the Answer of Martin H. Bramwell and the comment of Ray Carnes I tested different things and found out what to do. I hope you both don't feel I steel your answer. I only try to explain what to do in small steps and what happens in my own words.

ton123
on 5/8/13, 5:44 AM

I am glad you are learning how to be successful with data exporting and importing. I am glad that you are sharing your experiences so everyone can benefit.

Bista Solutions US, Ray Carnes
on 5/8/13, 1:54 PM

I tried doing the same way you guys described here but now I feel like hell. Please anyone brief me How do I cope up with this difficulty. I am importing products and my error is: ValueError: No such external ID currently defined in the system: __export__.product_category_45 I already imported my product_category

evon_dun
on 12/5/13, 3:38 AM

Please start a new question, and post what you have imported as well as what you are trying to import.

Bista Solutions US, Ray Carnes
on 12/5/13, 12:08 PM

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/7/13, 4:23 PM
Seen: 2525 times
Last updated: 3/16/15, 8:10 AM