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
    • Intelligence artificielle
    • 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
    • Supermarché
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • 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
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Homme à tout faire
    • Matériel informatique & 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
    Parcourir toutes les 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
    • Devenir partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    • Referral Program
    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
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

Odoo 19 POS Receipt Customization – Remove Default Unit Price and Show Custom MRP Line

S'inscrire

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

Cette question a été signalée
javascriptpos
1 Répondre
1025 Vues
Avatar
Ashilkrishna

Hello Everyone,

I am trying to customize the POS receipt in Odoo 19.

Current default receipt output:

Pizza Vegetarian

$57.50 / Units

My requirement is:

Pizza Vegetarian

MRP ₹60 @ ₹50/unit

Explanation:

  • mrp is a custom field added in product.template

  • list_price (Sales Price) is ₹50

  • I want to:

    1. Remove the default “price per unit” line from the POS receipt

    2. Show custom text below the product name using MRP and Sales Price

I tried overriding the POS receipt template using this XML:

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<!-- POS Receipt Order Line -->
<t t-name="custom_pos_receipt.Orderline"
t-inherit="point_of_sale.Orderline"
t-inherit-mode="extension">

<!-- REMOVE DEFAULT UNIT PRICE LINE -->
<xpath expr="//div[contains(@class,'price-per-unit')]" position="replace">
</xpath>

<!-- ADD CUSTOM MRP LINE -->
<xpath expr="//div[contains(@class,'product-name')]" position="after">

<div style="
font-size:12px;
color:#555;
margin-top:2px;
font-weight:500;
">

MRP
<t t-esc="props.line.product.mrp"/>

@
<t t-esc="props.line.product.lst_price"/>

/unit

</div>

</xpath>

</t>

</templates>

Manifest:

'assets': {
    'point_of_sale._assets_pos': [
        'pos_receipt_custom/static/src/xml/pos_receipt.xml',
    ],
},

But POS crashes with errors like:

Thanks in advance.


0
Avatar
Ignorer
Codesphere Tech

Hello
1. Check "pos_receipt_custom" is your module name or not.
Let me know here.
Thanks

Ashilkrishna
Auteur

actually i defined mrp in odoometer_price_extn(product.product),i have not added custom field in pos loader,i just want to replace cureent price unit with mrp-value at salesprice after product name,can you share complete code,it would really help full

Ashilkrishna
Auteur

screen shot image is updated

Ashilkrishna
Auteur

i want like this-mrp:60 @ 50/unit(after product name by repacing current unitprice/unit)

Codesphere Tech

So you wnat to replace this line by your Custom field(mrp) price right?

Ashilkrishna
Auteur

yes i want to replace line with this sentence like-mrp:60 @ 50/unit(60 is mrp and 50 is selling price)

Avatar
Ashilkrishna
Auteur Meilleure réponse
yes but its not working,xpath replaces the current unitprice/unit,but my custom mrp line not coming after product name
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">

<t t-name="odoometer_price_extn.Orderline"
t-inherit="point_of_sale.Orderline"
t-inherit-mode="extension">

<!-- Remove default /Units line -->
<xpath expr="//li[hasclass('price-per-unit')]"
position="replace"/>

<!-- Dynamic MRP line -->
<xpath expr="//div[hasclass('product-name')]"
position="after">

<div t-if="props.line.mrp"
style="
font-size:10px;
color:#666;
margin-left:12px;
margin-top:1px;
">

<span style="text-decoration:line-through;">
<t t-esc="props.line.mrp"/>
</span>

<span style="margin:0 4px;">→</span>

<span style="font-weight:bold;">
<t t-esc="props.line.unit_price"/>
</span>

</div>

</xpath>

</t>

</templates>
{
'name': 'Odoo Meter Price Customizations',
'version': '1.0',
'depends': ['base', 'product', 'account', 'stock_account', 'tradelite_common', 'zl_thermal_invoice_print','point_of_sale'],
'data': [
'views/account_move_view.xml',
'views/product_template_view.xml',
'views/product_product_view.xml',
'report/thermal_invoice_template.xml',
],
'assets': {
'point_of_sale._assets_pos': [
'odoometer_price_extn/static/src/js/pos_receipt.xml',
# 'odoometer_price_extn/static/src/js/pos_orderline.js',
],
},
'installable': True,
'application': False,
'auto_install': False,
}
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é
Odoo 19 POS Pay Later – Need Review of Custom Implementation
javascript pos
Avatar
0
mai 26
929
I am customizing the POS receipt in Odoo 19.
javascript pos
Avatar
0
mai 26
957
Can anyone correct my code-iam coustmizing odoo 19 defualt pos reciept Résolu
javascript pos
Avatar
Avatar
1
mai 26
1323
does odoo 17 allow to add button to Navbar header in point of sale session inside it to get dynamic data
javascript pos
Avatar
Avatar
1
nov. 24
3644
How to add product in POS programmatically Résolu
javascript pos
Avatar
Avatar
Avatar
Avatar
4
oct. 24
7170
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
  • Devenir 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 Svenska ภาษาไทย 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