Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

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

Odoberať

Get notified when there's activity on this post

This question has been flagged
communityposrecieptv15
1 Odpoveď
3386 Zobrazenia
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
Zrušiť
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
Autor

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
Autor

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
Autor

yes, but it gives me datetime with timezone

mer5
Autor

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
Autor

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
Best Answer

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
Zrušiť
mer5
Autor

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')"

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
how can i change product line size font in the receipt pos
pos reciept point_of_sale v15
Avatar
Avatar
1
jan 23
5277
POS with iPad and Iot
community pos pi v15
Avatar
0
máj 22
2814
Pos END session - odoo down
community pos odoo v15
Avatar
0
mar 22
127
Error in replace div in custom receipt
pos v15
Avatar
Avatar
1
júl 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
3269
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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