Skip to Content
Menu
This question has been flagged
2965 Views

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.

Avatar
Discard

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

Related Posts Replies Views Activity
2
Mar 23
2697
2
Mar 15
8492
3
Apr 25
4599
2
Mar 24
3017
5
Nov 23
42936