Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
78 Vues

Hi,

I’m using Odoo 18 and developing an application that interfaces with it via the JSON-RPC API. Everything works well overall — I can perform all kinds of operations successfully. However, I’ve encountered an issue when updating the text of the field product_template.description_ecommerce in a specific language: the change is applied to all languages instead of just the one intended.

It doesn’t matter whether it’s the default language or another one — the result is the same.

Interestingly, when I perform the same operation on the name field, it works perfectly.

For example, the product_description field for a given product_template record currently contains the following data in the database:

{"en_US": "text", "es_ES": "something wrong"}

I want to change "something wrong" to "text". When I perform a write operation on the record ID, using the correct language in the context (e.g., es_ES), the result becomes:

{"en_US": "texto", "es_ES": "texto"}

The product_description field is marked as translatable in Odoo (by default). I can edit both the English and Spanish versions correctly through the Odoo UI.

So my question is: why does this field behave differently from the name field? Is this a bug, or am I possibly missing something in my implementation?

   Best,
   Kurt.-


Avatar
Ignorer

What do you see in the Field Type column?

Meilleure réponse

Hi,


You’re working with Odoo 18 and using the JSON-RPC API to update product data. While most operations work correctly, you’ve encountered an issue with the product_template.description_ecommerce field. When you try to update its value in a specific language, the change is applied to all languages instead of only the intended one.


For example, if the field contains both English and Spanish values and you attempt to modify only the Spanish translation, both versions end up being updated. This behavior is inconsistent with the name field, which correctly respects the language context and updates only the targeted translation.


The field description_ecommerce is translatable, and updates through the Odoo UI work as expected, so the issue appears only when using the JSON-RPC API. This suggests that Odoo might handle translations differently for this field type or that there could be a bug or limitation in how JSON-RPC processes translations for non-standard fields.


Hope it helps

Avatar
Ignorer