Can t-esc-options and t-field-options options be used in the product template id like below?
span t-field="product.list_price" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Can t-esc-options and t-field-options options be used in the product template id like below?
span t-field="product.list_price" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'
Hello Anthony Nelson,
You can use the below code, maybe it's useful for you.
Fine Code in Comment.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
<t t-esc="product.list_price" t-options='{"widget": "float", "precision": 2}'/><t t-esc="product.currency_id.symbol"/>
Thank you Jainesh! That works! I swapped the value and currency symbol around.
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
How to xpath t-attf-class in website odoo14
Diselesaikan
|
|
6
Feb 24
|
7918 | |
|
0
Mar 22
|
4 | ||
|
1
Agu 21
|
2824 | ||
|
1
Jul 25
|
2297 | ||
|
2
Jul 25
|
7764 |
I have explored different options but the currency symbol and currency precision are not displayed...
t t-set="rrp" t-value="product.list_price"
span t-esc="rrp" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'
span t-esc="rrp" t-esc-options='{"widget": "float", "precision": 2}'
The following works, formatting when setting the variable, but it's more hard coding that is not good...
t t-set="rrp" t-value="'{:.2f}'.format(product.list_price)"