I need help to set the currency symbol into the view...
Now i use this:
<field name="total_presupuestos" widget='monetary' options="{'currency_field': 'currency_id'}"/>
So currency_id is not defined in my table, how can i do it?
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I need help to set the currency symbol into the view...
Now i use this:
<field name="total_presupuestos" widget='monetary' options="{'currency_field': 'currency_id'}"/>
So currency_id is not defined in my table, how can i do it?
Thanks
In your .py file
You should add currency_id
field in your object.
'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
in view.xml
You should add currency_id
field before your total_presupuestos
field.
<field name="currency_id" groups="base.group_multi_currency"/>
Hope it work for you.
Error returned: 'Currency' is not Defined. ... any other metod to add ⬠symbol to my currency fields?
where you define 'Currency' in your code or your xml file..??? please post that code. what changes you have done, after applying my suggestion..???
Sorry, I don't typed it correctly. When i'm pasted exactly your code, this return :: Uncaught Error: Unknown field in the domain state [["state","not in",["draft"]]]
No need of this states, remove it then check. remove states={'draft':[('readonly',False)]} from currency_id.
You saved my day. Thank you.
We need to currency_id in the view as well, I was missing this point.
I finally found an easy way to do it:
<label for="total_presupuestos"/>
<div>
<field name="total_presupuestos" class="oe_inline" /> â¬
</div>
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
abr 24
|
1620 | ||
|
2
ene 24
|
1723 | ||
Error message
Resuelto
|
|
2
nov 23
|
2590 | |
change in currency configuration
Resuelto
|
|
1
mar 24
|
1922 | |
|
4
sept 23
|
16670 |
https://www.youtube.com/watch?v=qfzZjEsoL-I