Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
5228 Vistas

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
Descartar
Autor Mejor respuesta

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
Descartar
Autor

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?

Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
nov 16
4006
0
jul 25
347
8
ene 25
6875
2
dic 20
11812
4
oct 15
5129