コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3052 ビュー

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
2789
2
3月 15
8601
3
4月 25
4813
2
3月 24
3173
5
11月 23
43181