2016-08-18 73 views

回答

4

purshase.order模型转换total_amount字母创建功能。

from openerp import models, api 
from openerp.tools import amount_to_text_fr 

class purchase_order(models.Model): 
    _inherit = 'purchase.order' 

    @api.depends('amount_total', 'currency_id') 
    def compute_text(self): 
     return amount_to_text_fr(self.amount_total, self.currency_id.symbol) 

从QWEB报告称其使用:

<span t-esc="o.compute_text()" /> 
+0

感谢*** ***肯利... –

+0

它给我一些其他的语言。我想用英语说出来,所以请告诉我什么是happning –

+0

@TahirNoor我很乐意提供帮助。将'fr'更改为'en'。 – Zety