Odoo Help


1 Answer

Yenthe Van Ginneken

--Yenthe Van Ginneken--
| 9 9 12
Turnhout, Belgium
--Yenthe Van Ginneken--

My Odoo training platform: https://www.oocademy.com
My Odoo blog: http://www.odoo.yenthevg.com/
My Twitter: https://twitter.com/Yenthe666

Yenthe Van Ginneken
7/12/19, 2:47 AM

Hi Christian,

If you have an element in your report that is within a span you will indeed see the <span></span> element itself being included in the translation terms. This is normal and desired behaviour. You can actually see examples of this in the official Odoo code too. Have a look at the "Disc %" span on the sale order report at https://github.com/odoo/odoo/blob/8f9e1e40a32748e576084320b4f9a4c1165b7a10/addons/sale/report/sale_report_templates.xml#L79 and then look at the source terms at https://github.com/odoo/odoo/blob/8f9e1e40a32748e576084320b4f9a4c1165b7a10/addons/sale/i18n/nl.po#L325-L328

You'll see that the term also has the <span> in the translation term set:

#. module: sale
#: model_terms:ir.ui.view,arch_db:sale.report_saleorder_document
msgid "Disc.(%)"
msgstr "Krt.(%)"

In your example you've added your CSS style into the element itself though. It is cleaner to create a SCSS file, adding the CSS in there and setting a class on the element. You're doing translations correct anyways.



Ask a Question
Keep Informed
1 follower(s)
About This Community

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

Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now