Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
450 Tampilan

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


Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mei 25
1034
1
Mei 23
1634
3
Jan 16
9672
0
Sep 20
7549
0
Mar 25
1726