Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How to reprint the pos order receipt?

Subscribe

Get notified when there's activity on this post

This question has been flagged
posreceiptreprintodoo16
2770 Views
Avatar
Zahra Naveed

i have customized my odoo receipt and it works great in a normal cycle of pos but if i want to reprint any order that is paid using orders at the top of pos . it didnt show the complete information.
https://drive.google.com/file/d/1C-pYxlBtSbcI1KRZWpnYemE04VzH1LWW/view?usp=sharing
above link is this is my actual receipt view
this is how it show when i access it from order at the top in odoo 16

https://drive.google.com/file/d/1tzYTLWxKczfExi3b1XkTMkQQLVR_BLHI/view?usp=sharing

it didnt pick up the orderlines , customer(name,number,address) lastly the subtotal,delivery charges before the GST tax line in the bottom.

this is my xml code with which i am working in the comment.


0
Avatar
Discard
Zahra Naveed
Author

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- Define a new template 'AddonsRecipt' based on the 'point_of_sale.OrderReceipt' template -->
<t t-name="AddonsReceipt" t-inherit="point_of_sale.OrderReceipt"
t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('orderlines')]" position="replace">
<!-- Divider line -->
<div class="order-line-divider" style="text-align: center;">
<hr style="width: 100%; border: 1px solid black; margin-top: 15px; margin-bottom: 15px" />
</div>
<t t-set="total_quantity" t-value="0"/>
<div class="orderlines" >
<t t-foreach="receipt.orderlines" t-as="line" t-key="line.id">
<t t-set="total_quantity" t-value="total_quantity + line.quantity"/>
<div style="padding-bottom: 10px;">
<!-- Add padding here -->
<t t-if="isSimple(line)">
<!-- Display the product name and price-->
<div style="font-weight: bold;">
<div style="display: flex; justify-content: space-between;">
<div style="flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<span t-esc="Math.round(line.quantity * Math.pow(10, env.pos.dp['Product Unit of Measure'])) / Math.pow(10, env.pos.dp['Product Unit of Measure'])"/>
x
<t t-esc="line.product_name_wrapped[0]"/>
</div>
<div style="flex-shrink: 0;">
<span t-esc="env.pos.format_currency_no_symbol(line.price_display)" class="price_display"/>
</div>
</div>
<div style="margin-left: 22px;">
<WrappedProductNameLines line="line"/>
</div>
</div>
</t>
<t t-else="">
<div style="font-weight: bold;">
<div style="display: flex; justify-content: space-between;">
<div style="flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<span t-esc="Math.round(line.quantity * Math.pow(10, env.pos.dp['Product Unit of Measure'])) / Math.pow(10, env.pos.dp['Product Unit of Measure'])"/>
x
<t t-esc="line.product_name_wrapped[0]"/>
</div>
<div style="flex-shrink: 0;">
<span t-esc="env.pos.format_currency_no_symbol(line.price_display)" class="price_display"/>
</div>
</div>
<div style="margin-left: 22px;">
<WrappedProductNameLines line="line"/>
</div>
</div>
<!-- Check if the discount policy is set to 'without_discount' and the price has changed from the list price -->
<t t-if="line.display_discount_policy == 'without_discount' and line.price != line.price_lst">
<div class="pos-receipt-left-padding">
<t t-esc="env.pos.format_currency_no_symbol(line.price_lst)"/>
->
<t t-esc="env.pos.format_currency_no_symbol(line.price)"/>
</div>
</t>
<t t-elif="line.discount !== 0">
<div class="pos-receipt-left-padding">
<t t-if="env.pos.config.iface_tax_included === 'total'">
<t t-esc="env.pos.format_currency_no_symbol(line.price_with_tax_before_discount)"/>
</t>
<t t-else="">
<t t-esc="env.pos.format_currency_no_symbol(line.price)"/>
</t>
</div>
</t>
<!--Display the discount amount-->
<t t-if="line.discount !== 0">
<div class="pos-receipt-left-padding">
Discount: <t t-esc="line.discount"/>%
</div>
</t>
</t>
<t t-if="line.customer_note">
<div class="pos-receipt-left-padding pos-receipt-customer-note-left-align" style="font-style: italic; margin-left: -7px;">
<t t-esc="'&quot;' + line.customer_note + '&quot;'"/>
</div>
</t>
<!-- Show addon products in Receipt -->
<tr t-foreach="props.order.orderlines" t-as="orderline"
t-key="orderline_index">
<t t-if="line.orderline_id == orderline.id">
<tr t-foreach="orderline.addon_items"
t-as="addon_item" t-key="addon_item_index">
<div class="pos-receipt" >
<span
t-esc="addon_item.addon_name"
style="margin-left: 22px;"/>
<span style="margin-left:8px"
class="pos-receipt-right-align">
<span t-esc="env.pos.format_currency_no_symbol(addon_item.addon_price_without)"/>
</span>
</div>
</tr>
</t>
</tr>
</div> <!-- Close padding div here -->
</t>
</div>
<!-- Divider line -->
<div class="order-line-divider" style="text-align: center;">
<hr style="width: 100%; border: 1px solid black;" />
</div>
<br></br>
<div style="text-align: center;">
<span t-esc="total_quantity"/> Items Ordered.
</div>
<br></br>
</xpath>
<xpath expr="//t[@t-if='!isTaxIncluded']" position="before">
<t t-if="receipt.delivery_line.length > 0">
<t t-if="receipt.delivery_line[0].price">
<div class="pos-receipt-amount-left-align">
Subtotal
<span t-esc="env.pos.format_currency_no_symbol(receipt.total_without_tax - receipt.delivery_line[0].price)"
class="pos-receipt-right-align"/>
</div>
<div class="pos-receipt-amount-left-align">
Delivery Charges<span t-esc="env.pos.format_currency_no_symbol(receipt.delivery_line[0].price)" class="pos-receipt-right-align"/>
</div>
</t>
</t>
</xpath>
<xpath expr="//t[@t-if='!isTaxIncluded']" position="replace">
<t t-if="!isTaxIncluded">
<t t-if="receipt.table != 'DELIVERY'">
<div>Subtotal<span t-esc="env.pos.format_currency_no_symbol(receipt.subtotal)" class="pos-receipt-right-align"/></div>
</t>
<t t-foreach="receipt.tax_details" t-as="tax" t-key="tax.tax.id">
<div class="responsive-price">
<t t-esc="tax.name" />
<span t-esc='env.pos.format_currency_no_symbol(receipt.total_with_tax-receipt.subtotal)' class="pos-receipt-right-align"/>
</div>
</t>
</t>
</xpath>
<xpath expr="//div[hasclass('pos-receipt-amount')][contains(text(), 'Grand Total')]" position="replace">
<div class="pos-receipt" style="text-align: center;">
<hr style="width: 100%; border: 1px solid black; " />
</div>
<div class="pos-receipt-amount-left-align">
Total
<span t-esc="env.pos.format_currency_no_symbol(receipt.total_with_tax)" class="pos-receipt-right-align"/>
</div>
</xpath>
<xpath expr="//t[@t-if='receipt.total_rounded != receipt.total_with_tax']" position="replace">
<t t-if="receipt.total_rounded != receipt.total_with_tax">
<div class="pos-receipt-amount-left-align">
Rounding
<span t-esc='env.pos.format_currency_no_symbol(receipt.rounding_applied)' class="pos-receipt-right-align"/>
</div>
<div class="pos-receipt-amount-divider" style="text-align: center;">
<hr style="width: 100%; border: 1px solid black;" />
</div>
<div class="pos-receipt-amount-left-align" style="font-weight: bold;">
Payable
<span t-esc='env.pos.format_currency_no_symbol(receipt.total_rounded)' class="pos-receipt-right-align"/>
</div>
</t>
<br></br>
<div class="pos-receipt-amount-left-align receipt-change">
Change
<span t-esc="env.pos.format_currency_no_symbol(receipt.change)" class="pos-receipt-right-align"/>
</div>
</xpath>

<!--HIDE FIELDS-->
<xpath expr="//div[@class='pos-receipt-contact']/following-sibling::br[1]" position="attributes">
<attribute name="style">display:none;</attribute>
</xpath>
<xpath expr="//div[@class='pos-receipt-contact']/following-sibling::br[2]" position="attributes">
<attribute name="style">display:none;</attribute>
</xpath>
<xpath expr="//div[@class='pos-receipt-right-align' and text()='--------']" position="replace">
</xpath>
<xpath expr="//t[@t-esc='receipt.name']" position="replace">
</xpath>
<xpath expr="//t[@t-esc='receipt.date.localestring']" position="replace">
</xpath>
<xpath expr="//t[@t-esc='receipt.date.validation_date']" position="replace">
</xpath>
<xpath expr="//t[@t-if='receipt.company.vat']" position="replace">
</xpath>
<xpath expr="//t[@t-if='receipt.table']" position="replace">
</xpath>
<xpath expr="//t[@t-if='receipt.table and receipt.customer_count']" position="replace">
</xpath>
<xpath expr="//t[@t-foreach='receipt.paymentlines']" position="replace">
</xpath>
<xpath expr="//div[contains(@class, 'pos-receipt-amount receipt-change')]" position="replace">
</xpath>
<xpath expr="//t[@t-if='receipt.cashier']" position="replace">
</xpath>
<xpath expr="//t[@t-if='receipt.company.contact_address']" position="replace">
</xpath>
<xpath expr="//t[@t-if='receipt.delivery_line.length>0']" position="replace">
</xpath>
<xpath expr="//t[@t-if='receipt.company.logo']" position="replace">
</xpath>

<!--Contact-->
<xpath expr="//t[@t-if='!receipt.header_html and receipt.header']" position="before">
<t t-if="receipt.company.logo">
<img class="pos-receipt-logo" t-att-src="receipt.company.logo" alt="Logo"/>
</t>
</xpath>
<xpath expr="//div[contains(@style, 'white-space:pre-line') and not(contains(@style, 'line-height'))]" position="attributes">
<attribute name="style">white-space:pre-line; line-height: 1.5; font-size: 14px;</attribute>
</xpath>
<xpath expr="//div[hasclass('pos-receipt-contact')]/div[contains(., 'Customer :')]" position="attributes">
<attribute name="style">text-align: left; font-size: 14px; line-height: 1.5;</attribute>
</xpath>
<xpath expr="//div[hasclass('pos-receipt-contact')]/div[contains(., 'Delivery Address :')]" position="attributes">
<attribute name="t-if">receipt.table == 'DELIVERY'</attribute>
<attribute name="style">text-align: left; font-size: 14px; line-height: 1.5;</attribute>
</xpath>
<xpath expr="//div[hasclass('pos-receipt-contact')]/div[contains(., 'Phone :')]" position="attributes">
<attribute name="t-if">receipt.table == 'DELIVERY'</attribute>
<attribute name="style">text-align: left; font-size: 14px; line-height: 1.5;</attribute>
</xpath>
<xpath expr="//t[@t-if='!receipt.header_html and receipt.header']" position="after">
<br></br>
<div class="flex-container" style="display: flex; justify-content: space-between; margin-top: 20px;">
<div class="table-info" style="text-align: left; font-weight: bold; font-size: 15px; line-height: 1.5;">
<t t-if="receipt.table">
<t t-esc="receipt.table" />
</t>
<t t-foreach="receipt.paymentlines" t-as="line" t-key="line.cid">
<div>
<t t-esc="line.name" />
</div>
</t>
<br></br>
</div>
<div class="pos-receipt-order-data" style="text-align: right; font-size: 13px;">
<t t-if="receipt.date.localestring">
<div><t t-esc="props.order.get_custom_formatted_date(receipt.date.localestring)"/></div>
</t>
<t t-else="">
<div><t t-esc="props.order.get_custom_formatted_date(receipt.date.validation_date)" /></div>
</t>
<div><t t-esc="receipt.name.replace('Order ', 'Order ID: ')" /></div>
<div>Order Taker:
<t t-if="receipt.floor">
<t t-esc="receipt.floor" />
</t>
</div>
</div>
<br></br>
</div>
</xpath>
</t>
</templates>

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

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

Sign up
Related Posts Replies Views Activity
POS Receipt reprint in odoo V15 CE Solved
pos receipt reprint
Avatar
Avatar
Avatar
2
Apr 22
4014
Custom Pos Receipt
pos receipt
Avatar
Avatar
1
Dec 24
3037
Pos Receipt
pos receipt
Avatar
0
Aug 24
2385
Can you customize Pos receipt via studio? Solved
pos receipt
Avatar
Avatar
1
Aug 24
3709
How to add index to each order line in POS receipt?
pos receipt
Avatar
0
Jul 24
2207
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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