Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

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

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
posreceiptposticketOdoo13.0v13
1 Répondre
9461 Vues
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
Ignorer
Avatar
Prakash
Meilleure réponse
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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
How to reprint POS receipt? Résolu
pos receipt receipt print Odoo13.0
Avatar
Avatar
Avatar
2
mai 21
11148
POS Fiscalisation
javascript pos receipt rpc Odoo13.0
Avatar
0
déc. 20
2755
Pos Ticket print out , odoo 10 community and windows OS
pos ticket xml receipt posticket
Avatar
0
oct. 18
3929
Extend POS receipt. Append barcode with order id
pos qweb receipt posticket point_of_sale
Avatar
Avatar
1
sept. 17
6844
How to change/modify the size of POS receipt/POS ticket in Odoo V10 ?
pos receipt posticket pos.xml posreceipt
Avatar
0
mai 17
6647
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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