Community mailing list archives

Re: Monetary formatted values in all financial amounts

Leonardo Donelli
- 09/03/2015 05:18:58
Odoo has a "standard" way to do this: you can pass the option
'currency_field' to the monetary fields, and the widget will show the
currency symbol (even in the correct position according to the
currency rules!). The problem is that for every model where you want
to display the currency you must have a field referencing the

This is an example from the sale view, the total untaxed amount
(where, in fact, you can see the currency)::


If you really want to always display a $ amount after every monetary
value, as an extremely ugly but simple hack (and you will lose
multiple currency support) you can extend the xml for the monetary
widget that you find here[1] and just add a "$" sign after the amount.
There are better ways to do it, like extending the currency_field
mechanism to default to a standard currency ($ in your case) when no
currency_field is specified, but it requires a little (just a little!)
more work.


2015-09-03 6:36 GMT+02:00 OpenERP Master <>:
> I am not sure how to proceed. For anyone, I will send you $100 USD via
> PayPal if you can provide a working solution to show the $ sign as a
> widget="whatever" on a tree view.
> On Thu, Aug 20, 2015 at 2:52 AM, Leonardo "LeartS" Donelli
> <> wrote:
>> Take a look here:
>> particularly:
>> What you want to do is extend the standard monetary widget.
>> Here is an example of a module that extends a standard widget (the
>> datetime widget):
>> _______________________________________________
>> Mailing-List:
>> Post to:
>> Unsubscribe:
> _______________________________________________
> Mailing-List:
> Post to:
> Unsubscribe: