This is a technical module to restore the possibility of Odoo to print RML reports in other languages than the user's language (for instance, the customer's language in the case of a sale order).
Odoo 8.0 has lost that capability due to an unlucky combination of technical aspects of the deprecated RML report functionality and the new API. While the static content of the report is translated fine, any translatable fields will still be rendered in the language of the user.
See https://github.com/odoo/odoo/issues/7301 for the original bug report.
This module provides a tool for developers to work around this bug in their Python code.
With a dependency on this module, you can have any model inherit from the mixin model in your python class definition. You can then assign your class a _language_path member to indicate where to find the language into which its reports are to be translated. See the following code example:
class SaleOrder(models.Model): _name = 'sale.order' _inherit = ['sale.order', 'language.path.mixin'] _language_path = 'partner_id.lang'
In RML reports for such a model, you can then iterate over the records in the correct language using
[[ repeatIn(objects.with_language_path(), 'o') ]]
For further information, please visit:
bugfix in the Odoo core
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。