Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to set currency symbol into the view?

Francisco Martínez
on 6/24/13, 2:41 PM 2,930 views

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?



Ghanshyam Prajapati

--Ghanshyam Prajapati--
| 4 4 8
Pune, India
--Ghanshyam Prajapati--
OpenERP Developer
Ghanshyam Prajapati
On 6/25/13, 4:15 AM

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?

Francisco Martínez
on 6/25/13, 8:09 AM

where you define 'Currency' in your code or your xml file..??? please post that code. what changes you have done, after applying my suggestion..???

Ghanshyam Prajapati
on 6/25/13, 8:16 AM

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"]]]

Francisco Martínez
on 6/25/13, 1:13 PM

No need of this states, remove it then check. remove states={'draft':[('readonly',False)]} from currency_id.

Ghanshyam Prajapati
on 6/26/13, 2:19 AM
Francisco Martínez
On 6/25/13, 1:38 PM

I finally found an easy way to do it:

<label for="total_presupuestos"/>
   <field name="total_presupuestos" class="oe_inline" /> €

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 6/24/13, 2:41 PM
Seen: 2930 times
Last updated: 3/16/15, 8:10 AM