hey guys , i need some help , i'm novice in using RML ...i want to transform my total ( number ) which appear in module sale/report to letters in french , i get the methode , it's in Server\addons\account\report\account_invoice_report.py" i do the import in sale_report but....i don't know where do the call of the methods... any help are welcomed :) ps:working on openerp 7
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
In order to access your function in the rml report, You have to define the method in the rml report parser class
and so that you can call that function from rml by defining with in [[ ]]
and passing the required arguments.
hi Borni , i have used Amount to text as following :
from tools.amount_to_text import amount_to_text # in sale/sale_order.py
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context=None):
super(order, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
'show_discount':self._show_discount,
'amount_to_text':amount_to_text,
})
in RML :<para>[[amount_to_text(o.amount_total,'fr','dinars']]</para>
and nothing is displaying in the pdf
i have used amount_to_text_fr
the result is there but the translation is bad :/
add a ')' in expression rml : <para>[[amount_to_text(o.amount_total,'fr','dinars')]]</para>
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký