Browse Source

Dec 04: [FIX] Bug Fixed 'custom_receipts_for_pos'

pull/361/head
Cybrosys Technologies 5 months ago
parent
commit
a61e11b07c
  1. 2
      custom_receipts_for_pos/__manifest__.py
  2. 5
      custom_receipts_for_pos/doc/RELEASE_NOTES.md
  3. 256
      custom_receipts_for_pos/static/src/xml/order_receipt.xml

2
custom_receipts_for_pos/__manifest__.py

@ -22,7 +22,7 @@
################################################################################ ################################################################################
{ {
'name': 'POS Receipt Design', 'name': 'POS Receipt Design',
'version': '18.0.1.0.0', 'version': '18.0.1.0.1',
'category': 'Point of Sale', 'category': 'Point of Sale',
'summary': "POS Receipt, Receipt Design, POS Receipt Template, Design " 'summary': "POS Receipt, Receipt Design, POS Receipt Template, Design "
"Report, Custom Receipt, POS Report, Customise Receipt, Odoo18, " "Report, Custom Receipt, POS Report, Customise Receipt, Odoo18, "

5
custom_receipts_for_pos/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 18.0.1.0.0 #### Version 18.0.1.0.0
##### ADD ##### ADD
- Initial Commit for POS Receipt Design - Initial Commit for POS Receipt Design
#### 04.12.2024
#### Version 18.0.1.0.1
##### BUG FIX
- BUG FIX

256
custom_receipts_for_pos/static/src/xml/order_receipt.xml

@ -6,157 +6,163 @@
<div class="pos-receipt"> <div class="pos-receipt">
<t t-if="isTrue"> <t t-if="isTrue">
<ReceiptHeader data="props.data.headerData"/> <ReceiptHeader data="props.data.headerData"/>
<OrderWidget lines="props.data.orderlines" t-slot-scope="scope"> <OrderWidget t-if="props.data.orderlines?.length"
lines="props.data.orderlines"
t-slot-scope="scope"
generalNote="props.data.generalNote or ''"
screenName="props.data.screenName">
<t t-set="line" t-value="scope.line"/> <t t-set="line" t-value="scope.line"/>
<Orderline line="omit(scope.line, 'customerNote')" <Orderline basic_receipt="props.basic_receipt"
class="{ 'pe-none': true }"> line="omit(scope.line, 'customerNote')"
<li t-if="line.customerNote" class="{ 'px-0': true }"
class="customer-note w-100 p-2 my-1 rounded text-break"> showTaxGroupLabels="showTaxGroupLabels">
<i class="fa fa-sticky-note me-1" role="img" <li t-if="line.customerNote"
aria-label="Customer Note" title="Customer Note"/> class="customer-note w-100 p-2 my-1 rounded text-break">
<t t-esc="line.customerNote"/> <i class="fa fa-sticky-note me-1" role="img"
</li> aria-label="Customer Note"
<ul t-if="line.pack_lot_lines"> title="Customer Note"/>
<li t-foreach="line.pack_lot_lines" t-as="lot" <t t-esc="line.customerNote"/>
t-key="lot.cid"> </li>
<t t-if="lot.order_line.product.tracking == 'lot'">
Lot Number <t t-esc="lot.lot_name"/>
</t>
<t t-else="">
SN <t t-esc="lot.lot_name"/>
</t>
</li>
</ul>
</Orderline> </Orderline>
</OrderWidget> </OrderWidget>
<t t-if="!props.basic_receipt">
<t t-set="taxTotals" t-value="props.data.taxTotals"/>
<div t-if="taxTotals and taxTotals.has_tax_groups"
class="pos-receipt-taxes">
<div class="text-center">--------------------------------</div>
<t t-foreach="taxTotals.subtotals" t-as="subtotal"
t-key="subtotal.name">
<div class="d-flex">
<span t-if="showTaxGroupLabels" class="me-2"
style="visibility: hidden;">A</span>
<span class="fw-bolder"
t-out="subtotal.name"/>
<span t-esc="props.formatCurrency(subtotal.base_amount_currency)"
class="ms-auto"/>
</div>
<!-- Total --> <div t-foreach="subtotal.tax_groups"
<div class="pos-receipt-right-align">--------</div> t-as="tax_group" t-key="tax_group.id"
<br/> class="d-flex">
<div class="pos-receipt-amount"> <t t-if="showTaxGroupLabels">
TOTAL <span t-if="tax_group.group_label"
<span t-esc="props.formatCurrency(props.data.amount_total)" t-out="tax_group.group_label"
class="pos-receipt-right-align"/> class="me-2"/>
</div> <span t-else="" class="me-2"
<t t-if="props.data.rounding_applied"> style="visibility: hidden;">A</span>
<div class="pos-receipt-amount"> </t>
Rounding <span>
<span t-esc='props.formatCurrency(props.data.rounding_applied)' <span t-esc="tax_group.group_name"/>
class="pos-receipt-right-align"/> <t t-if="!taxTotals.same_tax_base">
</div> on
<div class="pos-receipt-amount">To Pay <span t-esc="props.formatCurrency(tax_group.base_amount_currency)"/>
<span t-esc='props.formatCurrency(props.data.amount_total + props.data.rounding_applied)' </t>
class="pos-receipt-right-align"/> </span>
<span t-esc="props.formatCurrency(tax_group.tax_amount_currency)"
class="ms-auto"/>
</div>
</t>
</div> </div>
</t>
<br/>
<br/>
<!-- Payment Lines --> <div class="text-center">--------------------------------</div>
<div class="pos-receipt-amount receipt-total">
<div class="paymentlines" t-foreach="props.data.paymentlines" <t t-out="props.data.label_total"/>
t-as="line" t-key="line_index"> <span t-esc="props.formatCurrency(taxTotals.order_total)"
<t t-esc="line.name"/>
<span t-esc="props.formatCurrency(line.amount, false)"
class="pos-receipt-right-align"/> class="pos-receipt-right-align"/>
</div> </div>
<div class="pos-receipt-amount receipt-change mt-2"> <t t-if="'order_rounding' in taxTotals">
CHANGE <div class="pos-receipt-amount receipt-rounding">
<span t-esc="props.formatCurrency(props.data.change)" <t t-out="props.data.label_rounding"/>
class="pos-receipt-right-align"/> <span t-esc="props.formatCurrency(taxTotals.order_rounding)"
</div> class="pos-receipt-right-align"/>
</div>
<!-- Extra Payment Info --> <div class="pos-receipt-amount receipt-to-pay">
To Pay
<span t-esc="props.formatCurrency(taxTotals.order_to_pay)"
class="pos-receipt-right-align"/>
</div>
</t>
<!-- Payment Lines -->
<div class="paymentlines text-start"
t-foreach="props.data.paymentlines" t-as="line"
t-key="line_index">
<t t-esc="line.name"/>
<span t-esc="props.formatCurrency(line.amount)"
class="pos-receipt-right-align"/>
</div>
<t t-if="props.data.total_discount"> <div t-if="'order_change' in taxTotals"
<div> class="pos-receipt-amount receipt-change">
Discounts <t t-out="props.data.label_change"/>
<span t-esc="props.formatCurrency(props.data.total_discount)" <span t-esc="props.formatCurrency(taxTotals.order_change)"
class="pos-receipt-right-align"/> class="pos-receipt-right-align"/>
</div> </div>
</t> <!-- Extra Payment Info -->
<div t-if="props.data.tax_details.length > 0" <t t-if="props.data.total_discount">
class="pos-receipt-taxes"> <div class="text-center">
<span/> <t t-out="props.data.label_discounts"/>
<span>TAX%</span> <span t-esc="props.formatCurrency(props.data.total_discount)"
<span>Tax</span> class="pos-receipt-right-align"/>
<span>Base</span> </div>
<span>Total</span>
<t t-foreach="props.data.tax_details" t-as="tax"
t-key="tax.tax.id">
<span t-esc="tax.tax.letter || ''"/>
<span><t t-esc="tax.tax.amount"/>
%</span>
<span t-esc="props.formatCurrency(tax.amount, false)"/>
<span t-esc="props.formatCurrency(tax.base, false)"/>
<span t-esc="props.formatCurrency(tax.amount + tax.base, false)"/>
</t> </t>
<t t-if="props.data.tax_details.length > 1"> <div class="before-footer"/>
<span/> <div t-if="props.data.pos_qr_code">
<span/> <br/>
<span t-esc="props.formatCurrency(props.data.amount_tax, false)"/> <div class="pos-receipt-order-data mb-2">
<span t-esc="props.formatCurrency(props.data.total_without_tax, false)"/> Need an invoice for your purchase ?
<span t-esc="props.formatCurrency(props.data.amount_total, false)"/> </div>
</t>
</div>
<div class="before-footer"/>
<div t-if="props.data.pos_qr_code">
<br/>
<br/>
<div class="pos-receipt-order-data mb-2">
Scan me to request an invoice for your purchase.
</div> </div>
<img id="posqrcode" t-att-src="props.data.pos_qr_code" <div t-if="['qr_code', 'qr_code_and_url'].includes(props.data.headerData.company.point_of_sale_ticket_portal_url_display_mode) and props.data.pos_qr_code"
class="pos-receipt-logo"/> class="mb-2">
</div> <img id="posqrcode"
<div t-if="props.data.ticket_code"> t-att-src="props.data.pos_qr_code"
<br/> class="pos-receipt-logo"/>
<br/>
<div class="pos-receipt-order-data">
You can go to <t t-out="props.data.base_url"/>/pos/ticket
and use the code below to request an invoice online
</div> </div>
<div class="pos-receipt-order-data"> <div t-if="props.data.pos_qr_code">
Unique Code: <t t-out="props.data.ticket_code"/> <div class="pos-receipt-order-data">
Unique Code: <t t-esc="props.data.ticket_code"/>
</div>
</div> </div>
</div> <div t-if="['url', 'qr_code_and_url'].includes(props.data.headerData.company.point_of_sale_ticket_portal_url_display_mode) and props.data.pos_qr_code">
<div class="pos-receipt-order-data"
t-attf-class="{{ props.data.ticket_portal_url_display_mode === 'qr_code_and_url' ? 'mt-3' : '' }}">
Portal URL: <t t-out="props.data.base_url"/>
/pos/ticket
</div>
</div>
</t>
<!-- Footer --> <!-- Footer -->
<div t-if="props.data.footer" class="pos-receipt-center-align" <div t-if="props.data.footer"
class="pos-receipt-center-align"
style="white-space:pre-line"> style="white-space:pre-line">
<br/> <br/>
<t t-esc="props.data.footer"/> <t t-esc="props.data.footer"/>
<br/> <br/>
<br/> <br/>
</div> </div>
<div class="after-footer"> <div class="after-footer">
<t t-foreach="props.data.paymentlines" t-as="line" <t t-foreach="props.data.paymentlines" t-as="line"
t-key="line_index"> t-key="line_index">
<t t-if="line.ticket"> <t t-if="line.ticket">
<br/> <br/>
<div class="pos-payment-terminal-receipt"> <div class="pos-payment-terminal-receipt">
<pre t-esc="line.ticket"/> <pre t-esc="line.ticket"/>
</div> </div>
</t> </t>
</t> </t>
</div> </div>
<br/> <br/>
<t t-if="props.shippingDate"> <t t-if="props.data.shippingDate">
<div class="pos-receipt-order-data"> <div class="pos-receipt-order-data">
Expected delivery: Expected delivery:
<div><t t-esc="props.shippingDate" /></div> <div><t t-esc="props.data.shippingDate" /></div>
</div> </div>
</t> </t>
<br/> <br/>
<div class="pos-receipt-order-data"> <div class="pos-receipt-order-data">
<p>Odoo Point of Sale</p> <p>Powered by Odoo</p>
<div t-esc="props.data.name"/> <div t-esc="props.data.name"/>
<div t-esc="props.data.date"/> <div id="order-date" t-esc="props.data.date"/>
</div> </div>
</t> </t>
<t t-else=""> <t t-else="">

Loading…
Cancel
Save