跳至內容
選單
此問題已被標幟
3036 瀏覽次數

How can I display the currency symbol on a sum in a tree view.

<field
​name="total"
​sum="amount_covered"
​widget='monetary'
​options="{'currency_field': 'currency_id'}"
​/>

That's my code and I want to display the currency symbol, but I can't.

頭像
捨棄

Hi,

Try like following.

company_id = fields.Many2one('res.company', string='Taxpayer Name',
default=lambda self: self.env.user.company_id)

company_currency = fields.Many2one("res.currency", string='Currency',
related='company_id.currency_id', readonly=True,
tracking=True)

<field name="total"  widget="monetary"


options="{'currency_field': 'company_currency'}" sum="amount_covered"/>


Regards

相關帖文 回覆 瀏覽次數 活動
2
3月 23
2781
2
3月 15
8594
3
4月 25
4787
2
3月 24
3158
5
11月 23
43153