Odoo Help


How to set currency symbol into the view?

Francisco Martínez
on 6/24/13, 2:41 PM 4,608 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" /> €

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


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