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.


Changing monetory order from '500 RM' to 'RM 500' in openerp7

on 10/3/13, 2:15 PM 1,288 views

In openerp the monetary value (total of the line items) is shown like below

enter image description here

Is it possible to display like RM 100 everywhere. The actual line in xml is below

<field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}" />

I got a clue to edit it in under web/xml/base.xml

<t t-name="FieldMonetary" t-extend="FieldChar">
    <t t-jquery="t:first" t-operation="before">
        <t t-if="widget.get('currency_info') and widget.get('currency_info').position === 'before'">
            <t t-esc="widget.get('currency_info').symbol"/>
    <t t-jquery="t:last" t-operation="after">
        <t t-if="widget.get('currency_info') and widget.get('currency_info').position === 'after'">
            <t t-esc="widget.get('currency_info').symbol"/>

but not sure of how to do that. Any idea of how to do this?

Change the after to before that should solve your problem

on 10/3/13, 4:46 PM

yeah i thought, but it's a "if condition" right. changing the values in the condition won't give us the result. so we should probably change the parameter. Wt do u think?

on 10/3/13, 4:52 PM

Did you see what Martin suggested below? I think that is actually the easiest solution.

on 10/4/13, 5:10 AM
martin mueller
On 10/3/13, 9:29 PM

I think you should go into accounting > miscellaneous > currencies, find MYR and change the symbol position to "before amount", then it will show "RM 500" instead of "500 RM". This setting is currency dependent.

If you want to change the separator/thousands separator, you must change that in settings > translations > languages. That setting is dependent on the customer's language. The combination of both settings does not always make perfect sense.

That's great, that works exactly how i need. Thanks a lot!!

on 10/4/13, 7:31 AM
On 10/3/13, 2:23 PM

I believe you are trying to have a print out in that order too right? If you change the way it is displayed on the web client, your print out will still come out as xxxRM and not RMxxx which is probably what you want. What you should do to accomplish a print out like RMxxx is to open the report editor and modify the print outs you are interested in. You will have to change it like From e.g

    [[ formatLang(o.amount_total, digits=get_digits(dp='Account'))  ]][[ o.currency_id.symbol ]] 
    [[ o.currency_id.symbol ]][[ formatLang(o.amount_total, digits=get_digits(dp='Account'))  ]]

You have to put the currency in from of the value here.

Hope this helps you

Thanks for your support my friend. I am sorry that's not what i want. i would like the web view to appear like that. I've already changed in the report part.

on 10/3/13, 2:27 PM

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: 10/3/13, 2:15 PM
Seen: 1288 times
Last updated: 3/16/15, 8:10 AM