Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

How to add a new field value in POS Receipt (OrderReceipt) template

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
posreceiptposticketOdoo13.0v13
1 Svar
9573 Visninger
Avatar
Gopakumar N G

How to add new field values in the Pos Receipt(both new fields and existing fields in Odoo product table). In the following receipt template


<t t-name="OrderReceipt">
<div class="pos-receipt">
<t t-if='receipt.company.logo'>
<img class="pos-receipt-logo" t-att-src='receipt.company.logo' alt="Logo"/>
<br/>
</t>
<t t-if='!receipt.company.logo'>
<h2 class="pos-receipt-center-align">
<t t-esc='receipt.company.name' />
</h2>
<br/>
</t>
<div class="pos-receipt-contact">
<t t-if='receipt.company.contact_address'>
<div><t t-esc='receipt.company.contact_address' /></div>
</t>
<t t-if='receipt.company.phone'>
<div>Tel:<t t-esc='receipt.company.phone' /></div>
</t>
<t t-if='receipt.company.vat'>
<div>VAT:<t t-esc='receipt.company.vat' /></div>
</t>
<t t-if='receipt.company.email'>
<div><t t-esc='receipt.company.email' /></div>
</t>
<t t-if='receipt.company.website'>
<div><t t-esc='receipt.company.website' /></div>
</t>
<t t-if='receipt.header_html'>
<t t-raw='receipt.header_html' />
</t>
<t t-if='!receipt.header_html and receipt.header'>
<div><t t-esc='receipt.header' /></div>
</t>
<t t-if='receipt.cashier'>
<div class='cashier'>
<div>--------------------------------</div>
<div>Served by <t t-esc='receipt.cashier' /></div>
</div>
</t>
</div>
<br /><br />

<!-- Orderlines -->

<div class='orderlines'>
<t t-foreach='receipt.orderlines' t-as='line'>
<t t-set='simple' t-value='(line.discount === 0 and line.unit_name === "Units" and line.quantity === 1 and !discount_to_show and !(line.display_discount_policy == "without_discount" &amp;&amp; line.price != line.price_lst))' />
<t t-if='simple'>
<div><t t-esc='line.product_name_wrapped[0]' /><span t-esc='widget.format_currency_no_symbol(line.price_display)' class="price_display pos-receipt-right-align"/></div><t t-call="OrderReceiptWrappedProductNameLines"/></t>
<t t-if='!simple'>
<div t-esc='line.product_name_wrapped[0]'/><t t-call="OrderReceiptWrappedProductNameLines"/><t t-if="line.display_discount_policy == 'without_discount' &amp;&amp; line.price != line.price_lst"><div class="pos-receipt-left-padding"><t t-esc="widget.format_currency_no_symbol(line.price_lst)" />-><t t-esc="widget.format_currency_no_symbol(line.price)" /></div>
</t>
<t t-elif='line.discount !== 0'>
<div class="pos-receipt-left-padding">
<t t-if="pos.config.iface_tax_included === 'total'">
<t t-esc="widget.format_currency_no_symbol(line.price_with_tax_before_discount)"/>
</t>
<t t-else="">
<t t-esc="widget.format_currency_no_symbol(line.price)"/>
</t>
</div>
</t>
<t t-if='line.discount !== 0'>
<div class="pos-receipt-left-padding">
Discount: <t t-esc='line.discount' />%
</div>
</t>
<div class="pos-receipt-left-padding">
<t t-esc="Math.round(line.quantity * Math.pow(10, pos.dp['Product Unit of Measure'])) / Math.pow(10, pos.dp['Product Unit of Measure'])"/>
<t t-if='line.unit_name !== "Units"' t-esc='line.unit_name'/>
x
<t t-esc='widget.format_currency_no_symbol(line.price_display_one)' />
<span class="price_display pos-receipt-right-align">
<t t-esc='widget.format_currency_no_symbol(line.price_display)'/>
</span>
</div>
</t>
</t>
</div>

<!-- Subtotal -->

<t t-set='taxincluded' t-value='Math.abs(receipt.subtotal - receipt.total_with_tax) &lt;= 0.000001' />
<t t-if='!taxincluded'>
<div class="pos-receipt-right-align">--------</div>
<br/>
<div>Subtotal<span t-esc='widget.format_currency(receipt.subtotal)' class="pos-receipt-right-align"/></div>
<t t-foreach='receipt.tax_details' t-as='tax'>
<div>
<t t-esc='tax.name' />
<span t-esc='widget.format_currency_no_symbol(tax.amount)' class="pos-receipt-right-align"/>
</div>
</t>
</t>

<!-- Total -->
<div class="pos-receipt-right-align">--------</div>
<br/>
<div class="pos-receipt-amount">
TOTAL
<span t-esc='widget.format_currency(receipt.total_with_tax)' class="pos-receipt-right-align"/>
</div>
<br/><br/>

<!-- Payment Lines -->

<t t-foreach='paymentlines' t-as='line'>
<div>
<t t-esc='line.name' />
<span t-esc='widget.format_currency_no_symbol(line.get_amount())' class="pos-receipt-right-align"/>
</div>
</t>
<br/>

<div class="pos-receipt-amount receipt-change">
CHANGE
<span t-esc='widget.format_currency(receipt.change)' class="pos-receipt-right-align"/>
</div>
<br/>

<!-- Extra Payment Info -->

<t t-if='receipt.total_discount'>
<div>
Discounts
<span t-esc='widget.format_currency(receipt.total_discount)' class="pos-receipt-right-align"/>
</div>
</t>
<t t-if='taxincluded'>
<t t-foreach='receipt.tax_details' t-as='tax'>
<div>
<t t-esc='tax.name' />
<span t-esc='widget.format_currency_no_symbol(tax.amount)' class="pos-receipt-right-align"/>
</div>
</t>
<div>
Total Taxes
<span t-esc='widget.format_currency(receipt.total_tax)' class="pos-receipt-right-align"/>
</div>
</t>

<div class='before-footer' />

<!-- Footer -->
<div t-if='receipt.footer_html' class="pos-receipt-center-align">
<t t-raw='receipt.footer_html'/>
</div>

<div t-if='!receipt.footer_html and receipt.footer' class="pos-receipt-center-align">
<br/>
<t t-esc='receipt.footer'/>
<br/>
<br/>
</div>

<div class='after-footer'>
<t t-foreach='paymentlines' t-as='line'>
<t t-if='line.ticket'>
<br />
<div class="pos-payment-terminal-receipt">
<t t-raw='line.ticket'/>
</div>
</t>
</t>
</div>

<br/>
<div class="pos-receipt-order-data">
<div><t t-esc='receipt.name' /></div>
<div><t t-esc='receipt.date.localestring' /></div>
</div>

</div>
</t>
0
Avatar
Kassér
Avatar
Prakash
Bedste svar
t-extend OrderReceipt template and add new field.

Default core module "pos_cash_rounding"  used, sample code

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="OrderReceipt">
<t t-jquery='.pos-receipt-amount:first' t-operation='after'>
<t t-if="receipt.total_rounded != receipt.total_with_tax">
<div class="pos-receipt-amount">
ROUNDED
<span t-esc='widget.format_currency(receipt.total_rounded)' class="pos-receipt-right-align"/>
</div>
</t>
</t>
</t>
<t t-extend="PaymentScreen-Paymentlines">
<t t-jquery='.paymentlines-empty > .total' t-operation='replace'>
<div class='total'>
<t t-esc="widget.format_currency(order.get_total_with_tax() + order.get_rounding_applied())"/>
</div>
</t>
</t>
</templates>
0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
How to reprint POS receipt? Løst
pos receipt receipt print Odoo13.0
Avatar
Avatar
Avatar
2
maj 21
11213
POS Fiscalisation
javascript pos receipt rpc Odoo13.0
Avatar
0
dec. 20
2786
Pos Ticket print out , odoo 10 community and windows OS
pos ticket xml receipt posticket
Avatar
0
okt. 18
3992
Extend POS receipt. Append barcode with order id
pos qweb receipt posticket point_of_sale
Avatar
Avatar
1
sep. 17
6884
How to change/modify the size of POS receipt/POS ticket in Odoo V10 ?
pos receipt posticket pos.xml posreceipt
Avatar
0
maj 17
6697
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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