Connectors mailing list archives

connectors@odoo-community.org

Avatar

Issue with HTML translations fields

by
Quentin THEURET
- 21/05/2019 10:37:08

Hello,

I'm facing an issue with the Odoo <-> Prestashop connector. The connector works fine but when I get the `description` field of the Prestashop product into the `description_html` of the Odoo product.template, translations are not saved well. In my case, I have two language, en_US and fr_FR and in the value of the field, I get only the fr_FR, not the en_US value.

I cheked deeply in Odoo and I found an issue with the translation method for `fields.Html` that don't create translations for other lang but override the base value of the translated field.

I worked on v10 but by checking the code of v12, I think the issue is already there (https://github.com/odoo/odoo/blob/09af3fac3958d41dd21266c82402bea3e62c4f7c/odoo/models.py#L3406).


To fix (partially) the problem, I change the definition of the `description_html` field from fields.Html to fields.Text but this is not a complete fix as I want to keep my field as Html field.


Does anyone already faced this issue ? Do you have a solution to fix this problem ?


Best regards

-- 
Quentin THEURET
Kerpeo

Follow-Ups