Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5923 Vizualizări

I have inherited a model "account_invoice" and also inherited a view "account.invoice_form".

I want to dispay invoice total amount in compay currency, I have converted it using extra functional field "amount_toatl_cc". But i unable to display company currency symbol. Please help me with the below code

<xpath expr="/form/sheet/notebook/page/group/field[@name='amount_total']" position="after">
                <field name="amount_toatl_cc" widget="monetary" options="{'currency_field':'company_id.currency_id'}"/>
            </xpath>

Symbol not showing with above code. 

If i write "currency_id" inplace of "company_id.currency_id" it is showing selected currency symbol, but i need company currency symbol .

Thank you.

 

 

 

Imagine profil
Abandonează
Cel mai bun răspuns

create a related field based on company_id to fetch the company currency_id

'company_currency_id': fields.related('company_id','currency_id',type='many2one',relation='res.currency',string='Company currency',store=True,readonly=True)

and include 'company_currency_id' in options to get the company currency symbol

<xpath expr="/form/sheet/notebook/page/group/field[@name='amount_total']" position="after">
                <field name="amount_toatl_cc" widget="monetary" options="{'currency_field':'company_currency_id'}"/>
            </xpath>

 

 

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
sept. 17
6352
1
iun. 16
10443
1
apr. 24
1624
2
ian. 24
1728
2
nov. 23
2598