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

How do I format the date on the POS receipt? (without time and timezone)

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
communityposrecieptv15
1 Beantwoorden
3379 Weergaven
Avatar
mer5

Hello guys,

for odoo15 community

i am trying to do a date format for the blow in the pos receipt, i have tried many options lie t-options and t-esc-options also widgets with no luck it always get the date, time and timezone (+02:00)



0
Avatar
Annuleer
Pektsekye

Have you tried this:
https://www.odoo.com/forum/help-1/what-are-options-to-format-date-in-the-pos-receipt-82291

<t t-esc="new Date().toString('d MMMM yyyy')"/>

mer5
Auteur

i am using <span t-if="!receipt.date.localestring" t-esc="receipt.date.validation_date"/>

Pektsekye

Try temporarily:
<span t-if="!receipt.date.localestring" t-esc="1000"/>
Just to check if you are changing the correct line.

mer5
Auteur

yes i am sure that i am changing the correct line as it takes affect exactly where i need, also i have change it with the line you provided me and it show 1000

Pektsekye

Have you tried it like this:
<span t-if="!receipt.date.localestring" t-esc="receipt.date.validation_date" t-field-options='{"format": "MM/dd/yyyy"}'/>

mer5
Auteur

yes, but it gives me datetime with timezone

mer5
Auteur

after time it show +02:00

Pektsekye

Does it work like this?
<span t-if="!receipt.date.localestring" t-field="receipt.date.validation_date" t-options='{"format": "MM/dd/yyyy"}'/>

mer5
Auteur

tried it and not working got error
Error: Unknown QWeb directive: 't-field'
at QWeb._compileNode (owl.js:1870:1)
at QWeb._compileChildren (owl.js:2173:1)
at QWeb._compileNode (owl.js:1968:1)
at QWeb._compileChildren (owl.js:2173:1)
at QWeb._compileNode (owl.js:1968:1)
at QWeb._compileChildren (owl.js:2173:1)
at QWeb._compileNode (owl.js:1968:1)
at QWeb._compileChildren (owl.js:2173:1)
at QWeb._compileNode (owl.js:1968:1)
at QWeb._compileChildren (owl.js:2173:1)

Pektsekye

Try to convert it:
<span t-if="!receipt.date.localestring" t-esc="datetime.datetime.strptime(receipt.date.validation_date, '%Y-%m-%d').strftime('%d %b %Y')"/>

Avatar
Pektsekye
Beste antwoord

Then try convert it:

t-esc="datetime.datetime.strptime(receipt.date.validation_date, '%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d')"


0
Avatar
Annuleer
mer5
Auteur

i got the error below

TypeError: Cannot read properties of undefined (reading 'datetime')
at QWeb.eval (eval at _compile (owl.js:1786:1), <anonymous>:299:39)
at QWeb.render (owl.js:1716:1)
at OrderReceipt.__render (owl.js:4586:1)
at OrderReceipt.__updateProps (owl.js:4494:1)

Pektsekye

Try like this:
t-esc="receipt.date.validation_date.strftime('%Y-%m-%d')"

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 change product line size font in the receipt pos
pos reciept point_of_sale v15
Avatar
Avatar
1
jan. 23
5274
POS with iPad and Iot
community pos pi v15
Avatar
0
mei 22
2813
Pos END session - odoo down
community pos odoo v15
Avatar
0
mrt. 22
127
Error in replace div in custom receipt
pos v15
Avatar
Avatar
1
jul. 24
3733
How to call another models onchange function in my custom model, when we call that , i want to work the fucntion
community v15
Avatar
Avatar
Avatar
2
aug. 23
3268
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