Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8418 Lượt xem

Some strings in reports are never translated, despite them being translated in other places of the system.

Example: Chart of Accounts in the General Ledger report. Chart of Accounts is translated correctly in other places of the system, such as in the Accounting menu, but not in the General Ledger report.

Looking into the RML file of the General Ledger report, I found that, unlike most other strings, Chart of Accounts is enclosed in a python code tag [1]:

<para style="terp_tblheader_General_Centre">[[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]]</para>

How can strings in python code tags in the RML file be translated?

[1] doc.openerp.com/v6.1/developer/05_reports.html#code-within-tags-is-python-code

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Have you tried the gettex(() function : _("text to translate") Since eval() is applied to this code, it should know about the gettex() and record an entry in ir.translation. To be confirmed. Nicolas

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
3810
3
thg 3 15
5120
0
thg 3 15
3643
5
thg 5 17
8695
1
thg 5 17
8012