Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
8284 Näkymät

so actually i'm following a tutorial about odoo 10.0 but I'm using odoo 11.0 to follow it up.then i stuck on a probem that have to show currency on a numbers (price). i want to use IDR currency but it doesn't show up the currency. It only shows the numbers.I tried Monetary widget with 3 kinds of typing syntax but it just wont show what i want...

here's the code


<div class="col-xs-2 text-right"><t t-esc="vehicle.product_id.list_price" t-option="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
                                    <field name="website.currency_id" invisible="1"/> 
                                </div>
                                <div class="col-xs-1 text-right"><t t-esc="vehicle.option_total"  t-option="{'widget': 'monetary', 'display_currency': website.currency_id}"/></div>
                                <div class="col-xs-2 text-right"><t t-esc="vehicle.product_id.list_price+vehicle.option_total" widget="monetary" options="{'currency_field': 'currency_id'}"/></div>

Avatar
Hylkää
Tekijä

Actually i found some typo like t-option should be t-options.

but even after that it wont show up.

Paras vastaus

Hello 

try like below code

<span t-field="o.amount" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
Avatar
Hylkää
Tekijä

Great!, its working!. Thanks!

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
syysk. 17
8306
1
toukok. 17
4604
1
helmik. 24
33615
1
maalisk. 15
9365
2
heinäk. 24
15841