Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Remove Currency Symbol in Monetary Fields

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
fieldcurrencyremovemonetarysymbol
6 Antwoorden
7487 Weergaven
Avatar
ESHANG Harshana

Hi Guys,

I need to remove the currency symbol for a specific monetary field.

Is this possible?


Please note that this is for a form view and not for a QWEB view.


Thank you

Eshan Harshana


0
Avatar
Annuleer
Cybrosys Techno Solutions Pvt.Ltd

https://www.odoo.com/forum/help-1/solved-how-to-remove-currency-symbol-from-monetary-field-qweb-report-98462

Jenish M

@ESHANG Harshana is asked for form view but this link is for QWEB!

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste antwoord

Hi,
Try this  code
Edit the XML View:
Find the field you want to modify.
It should look something like this in the XML view: 

<field name="amount_total" />

Add the options attribute to the field definition, specifying the 'currency_no_symbol' option:

<field name="amount_total" options="{'currency_no_symbol': True}" />

 

By adding this attribute with the 'currency_no_symbol' option, you are instructing Odoo to display the monetary value without the currency symbol.

Hope it helps

0
Avatar
Annuleer
Avatar
Rafael Krupinski
Beste antwoord
<span t-field="line.price_subtotal" t-options='{"widget": "float", "precision": 2}'/>


I think form should support the same options


odoo 17

3
Avatar
Annuleer
Avatar
Ufuk Togay
Beste antwoord

I have found another solution. Add below code to your model:

    def formatted_amount(self):

        return self.env['ir.qweb.field.monetary'].value_to_html(

            self.amount,

            {

                'currency': self.currency_id,

                'display_currency': self.currency_id

            }

        ).replace(self.currency_id.symbol, '').strip()

 And then use it like this:

<td class="text-end font-monospace" >

      <t t-esc="record.formatted_amount()" />

</td>​​

A bit tricky but couldn't get other suggestions work.

0
Avatar
Annuleer
Avatar
Ismael C
Beste antwoord

Hi, to remove currency symbols from models, try this solution, it worked.

example for a qweb field model in xml:   

"line.price.replace('€', '')" /> 

( replace  '€' with the currency symbol you use)

0
Avatar
Annuleer
Avatar
Jenish M
Beste antwoord

In the xml use widget="float" in the specific monetary field

example:

       field name="your_field" widget="float"/>

0
Avatar
Annuleer
Avatar
Michael Hofer
Beste antwoord

I have tried the solution from Cybrosys, but it does not work:

span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included" t-field-options="{'widget': False}"/

Have you ever managed to find a way how to hide the symbol?


Apologies for the weird formatting - Odoo strips all tags in the answer, even when it's formatted as code.

0
Avatar
Annuleer
Michael Hofer

I have seen that there is a `no_symbol` Option: https://github.com/odoo/odoo/blob/c00baa010e7981f16bf3047cee6aaee1fc0f7495/addons/web/static/tests/views/fields/monetary_field_tests.js#L930

However, I haven't found a way to use this in a QWeb view. Does anybody have a working solution?

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
How can i display company default currency symbol in my inherited views?
currency symbol
Avatar
Avatar
1
mrt. 15
6663
Symbol of local currency AFTER the digits? Opgelost
currency symbol Community
Avatar
Avatar
1
sep. 17
7144
How to display Currency Logo After Custom Field in ODOO 10.
currency monetary odoo10
Avatar
Avatar
1
aug. 17
14268
How to show a symbol inside a field like with the monetary widget? Opgelost
widget field monetary
Avatar
Avatar
1
mei 17
5300
[8.0] Currency position / Symbol Position - left to right Opgelost
currency position symbol
Avatar
Avatar
1
jun. 16
11066
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now