Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
436 Vizualizări

I changed the symbol position to "After amount" and changed the Symbol to €test just to make sure that its exactly this record, and it is, but the currency field is still displayed before the amount.


currency_id = fields.Many2one(

"res.currency", default=lambda self: self.env.company.currency_id, readonly=True

)


lohnkosten_m = fields.Monetary(

currency_field="currency_id"

)

view:

<group>

<field name="currency_id" invisible="1"/>

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

</group>


Odoo v17


Imagine profil
Abandonează
Cel mai bun răspuns

Hi,


Odoo determines where to place the currency symbol based on the settings of the currency itself and the user’s language. The symbol and position fields on the currency record define how the symbol should appear, but the user’s locale can override this. For example, in German, the Euro symbol is often shown before the amount regardless of the currency record’s settings.

If you changed the currency record to place the symbol after the amount but still see it before, it’s likely due to language formatting or cached assets in the browser. A hard refresh or clearing the cache can sometimes solve this, but often the issue comes from the language’s monetary format, which dictates how numbers and symbols are displayed.

There are two main ways to fix this. The cleanest way is to adjust the language configuration in Settings → Translations → Languages. Editing the monetary format field (for example, changing it to #,##0.00 ¤) ensures the symbol always displays after the amount. Alternatively, if you want full control and don’t want to rely on language settings, you can override the monetary widget in QWeb to explicitly render the amount followed by the currency symbol. This forces the display format regardless of locale.


Hope it helps

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mai 25
1012
1
mai 23
1619
3
ian. 16
9649
0
sept. 20
7546
0
mar. 25
1721