任何人都可以向我解释如何将 AMOUNT 转换为 FRENCH LETTERS 与 DINARS 作为货币。事实上,我已经尝试过,这个:
from openerp.report import report_sxw
from openerp.tools import amount_to_text_en
from openerp.tools import amount_to_text
import time
import datetime
from datetime import date
from datetime import datetime, date, time
class declaration_cnss(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
print ('----------------------test--------------------------')
super(declaration_cnss, self).__init__(cr, uid, name, context)
self.localcontext.update({
'get_employee_lines': self.get_employee_lines,
'amount_to_text': amount_to_text,
'amount_to_text_en': amount_to_text_en
})
在我的函数中,我有这个: amount_in_word = amount_to_text(somme_brut, lang='fr', currency='dinars') 但我收到警告:
2016-01-04 16:02:08,445 14045 WARNING ODOO
openerp.tools.amount_to_text_en: no translation function found for lang: 'fr'
金额将转换为英文字母。任何人都可以帮忙吗?
此致。