Skip to Content
Menu
This question has been flagged
2 Replies
5240 Views

I wrote a script which imports translations into the table ir_translation. I import translated product names in four languages. The import works like it should.

But if open the product -> click on edit -> click on the translation icon by the field name all of my translations get replaced in the database.

Why is that? How can I prevent it? 

Avatar
Discard
Author Best Answer

I can't use the interface because I have too many records, the interface can't handle it. I use the xmlrpc API for the import, I used it for many other things without any problems: https://www.odoo.com/documentation/8.0/api_integration.html

I fill these fields:
lang, src, name, type, res_id, value

After the import the field state says 'translated'.

No the translations don't show up, every time I click on the translate icon my translations get overriden, I didn't save! just by clicking on the icon and loading the translations.



Avatar
Discard
Author

I had src and value confused! everythings works like it should!

I would be very interested in this script also. Would you mind to share?

Best Answer

It would be best to use the export/import options from odoo's interface and not mess with the db data directly, because the ORM may need to trigger changes in other objects too.

Nevertheless, you don't give much information about the data you imported.

Did you include res_id and name? Do the translations show up when you open the translation form (prior to any changes)?

Odoo is a big weird in translations and runs some comparisons between the field data to be translated (in your case the product's name in the product_product table and the src field in the ir_translation table).

If you still can't figure it out, give us more details about the data/fields you imported.

Avatar
Discard
Related Posts Replies Views Activity
0
Nov 16
4017
0
Jul 25
366
8
Jan 25
6888
2
Dec 20
11836
4
Oct 15
5137