Browse Source

Jun 15: [FIX] Bug Fixed 'custom_receipts_for_pos'

pull/331/head
RisvanaCybro 11 months ago
parent
commit
00da3885e9
  1. 2
      custom_receipts_for_pos/README.rst
  2. 6
      custom_receipts_for_pos/__manifest__.py
  3. 5
      custom_receipts_for_pos/doc/RELEASE_NOTES.md
  4. 2
      custom_receipts_for_pos/models/__init__.py
  5. 4
      custom_receipts_for_pos/models/pos_config.py
  6. 23
      custom_receipts_for_pos/models/pos_session.py
  7. 40
      custom_receipts_for_pos/models/res_config_settings.py
  8. BIN
      custom_receipts_for_pos/static/description/assets/modules/6.jpg
  9. BIN
      custom_receipts_for_pos/static/description/assets/modules/6.png
  10. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/1.png
  11. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/2.png
  12. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/3.png
  13. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/4.png
  14. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/5.png
  15. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/6.png
  16. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/7.png
  17. BIN
      custom_receipts_for_pos/static/description/assets/screenshots/hero.gif
  18. 95
      custom_receipts_for_pos/static/description/index.html
  19. 168
      custom_receipts_for_pos/static/src/xml/order_receipt.xml
  20. 22
      custom_receipts_for_pos/views/pos_config_views.xml
  21. 34
      custom_receipts_for_pos/views/res_config_settings_views.xml

2
custom_receipts_for_pos/README.rst

@ -14,7 +14,7 @@ Credits
-------
Developer: (V14) Syamili K,
(V15) Sajna Sherin T,
(V16 & V17) Sadique Kottekkat, Abhishek E T @cybrosys
(V16 & V17) Sadique Kottekkat
Contact: odoo@cybrosys.com
Contacts

6
custom_receipts_for_pos/__manifest__.py

@ -22,7 +22,7 @@
################################################################################
{
'name': 'POS Receipt Design',
'version': '17.0.1.0.2',
'version': '17.0.1.0.3',
'category': 'Point of Sale',
'summary': "POS Receipt, Receipt Design, POS Receipt Template, Design "
"Report, Custom Receipt, POS Report, Customise Receipt, Odoo17, "
@ -38,7 +38,7 @@
'security/ir.model.access.csv',
'data/pos_receipt_data.xml',
'views/pos_receipt_views.xml',
'views/res_config_settings_views.xml',
'views/pos_config_views.xml'
],
'assets': {
'point_of_sale._assets_pos': [
@ -50,5 +50,5 @@
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
'application': False
}

5
custom_receipts_for_pos/doc/RELEASE_NOTES.md

@ -14,3 +14,8 @@
#### Version 17.0.1.0.2
##### BUGFIX
- Fix the receipt selection for each point of sales
#### 15.06.2024
#### Version 17.0.1.0.3
##### BUGFIX
- Move the configuration to select the receipt from configuration settings to POS configuration

2
custom_receipts_for_pos/models/__init__.py

@ -22,6 +22,4 @@
################################################################################
from .import pos_receipt
from .import pos_config
from .import res_config_settings
from .import pos_session

4
custom_receipts_for_pos/models/pos_config.py

@ -31,9 +31,7 @@ class PosConfig(models.Model):
_inherit = 'pos.config'
receipt_design = fields.Many2one('pos.receipt', string='Receipt Design',
help='Choose any receipt design',
default=lambda self: self.env[
'pos.receipt'].search([], limit=1))
help='Choose any receipt design')
design_receipt = fields.Text(related='receipt_design.design_receipt',
string='Receipt XML')
is_custom_receipt = fields.Boolean(string='Is Custom Receipt',

23
custom_receipts_for_pos/models/pos_session.py

@ -39,15 +39,6 @@ class PosSession(models.Model):
result['search_params']['fields'].append('qty_available')
return result
def _pos_ui_models_to_load(self):
"""Function that super the ui models loading"""
result = super()._pos_ui_models_to_load()
result += [
'res.config.settings',
'pos.receipt',
]
return result
def _loader_params_pos_receipt(self):
"""Function that returns the product field pos Receipt"""
return {
@ -60,17 +51,3 @@ class PosSession(models.Model):
def _get_pos_ui_pos_receipt(self, params):
"""Used to Return the params value to the pos Receipts"""
return self.env['pos.receipt'].search_read(**params['search_params'])
def _loader_params_res_config_settings(self):
"""The Function used to returns the field value"""
return {
'search_params': {
'fields': ['pos_receipt_design'],
},
}
def _get_pos_ui_res_config_settings(self, params):
"""Function is used to returns the config settings value"""
return (self.env['res.config.settings'].search_read
(**params['search_params']))

40
custom_receipts_for_pos/models/res_config_settings.py

@ -1,40 +0,0 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sadique Kottekkat (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
################################################################################
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
"""
This is an Odoo model for configuration settings. It inherits from the
'res.config.settings' model and extends its functionality by adding
fields for custom receipt design configuration
"""
_inherit = 'res.config.settings'
pos_receipt_design = fields.Many2one(
related='pos_config_id.receipt_design', readonly=False,
string='Receipt Design', help='Choose any receipt design')
pos_design_receipt = fields.Text(related='pos_config_id.design_receipt',
string='Receipt XML')
pos_is_custom_receipt = fields.Boolean(
related='pos_config_id.is_custom_receipt', readonly=False, store=True)

BIN
custom_receipts_for_pos/static/description/assets/modules/6.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
custom_receipts_for_pos/static/description/assets/modules/6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 92 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 38 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 182 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 49 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
custom_receipts_for_pos/static/description/assets/screenshots/hero.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 193 KiB

95
custom_receipts_for_pos/static/description/index.html

@ -88,7 +88,7 @@
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Choosing for Current Receipt Design.</p>
<p class="m-0" style="color:#718096">User can choose whether the current pos needs custom receipt design.
<p class="m-0" style="color:#718096">User can choose whether the current POS needs custom receipt design.
</p>
</div>
</div>
@ -185,7 +185,7 @@
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1rem !important">
We can add the Receipt designs from the backend in the menu 'Receipt Designs'.</h4>
We can add the receipt designs from the backend in the menu 'Receipt Designs'.</h4>
</div>
</div>
</div>
@ -203,7 +203,7 @@
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1rem !important">
We can choose the receipt design for each POS from the backend of the pos.</h4>
We can choose the receipt design for each POS from the backend of the POS.</h4>
</div>
</div>
</div>
@ -226,21 +226,22 @@
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/6.png" class="img-responsive" width="30%" height="auto">
<img src="assets/screenshots/7.png" class="img-responsive" width="30%" height="auto">
<img src="assets/screenshots/6.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/7.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Chosen receipt in the frontend</h4>
<h4 class="mt-2" style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Chosen receipt in the frontend
</h4>
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1rem !important">
We can see the chosen receipts for the POS in the frontend of the POS, It will vary as per we're choosing from the Backend for each POS.</h4>
<h4 class="mt-2" style=" font-weight:600 !important; color:#282F33 !important; font-size:1rem !important">
We can see the chosen receipts for the POS in the frontend of the POS.
</h4>
</div>
</div>
</div>
@ -261,7 +262,7 @@
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt=""
width="16px"></span>User can choose whether the current pos needs custom receipt design.
width="16px"></span>User can choose whether the current POS needs custom receipt design.
</li>
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
@ -273,39 +274,47 @@
</div>
<div id="tab3" class="tab-pane fade">
<div class="col-mg-12 active" style="padding: 1rem 4rem;">
<div class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;"><span>Version
17.0.1.0.0</span><span class="px-2">|</span><span
style="color: #714B67;font-weight: 600;">Released on: February 05, 2024</span>
<div class="py-3" style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;">
<span>Version 17.0.1.0.0</span><span class="px-2">|</span>
<span style="color: #714B67;font-weight: 600;">Released on: February 05, 2024</span>
</div>
<p class="m-0" style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Initial Commit for POS Receipt Designs.
</p>
</div>
</div>
<div class="col-mg-12 active" style="padding: 1rem 4rem;">
<div class="py-3" style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;">
<span>Version 17.0.1.0.1</span><span class="px-2">|</span>
<span style="color: #714B67;font-weight: 600;">Released on: April 17, 2024</span>
</div>
<p class="m-0"
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Initial Commit for POS Receipt Designs.</p>
<p class="m-0" style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Fixed the error in printing the receipt.
</p>
</div>
</div>
<div class="col-mg-12 active" style="padding: 1rem 4rem;">
<div class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;"><span>Version
17.0.1.0.0</span><span class="px-2">|</span><span
style="color: #714B67;font-weight: 600;">Released on: April 17, 2024</span>
<div class="py-3" style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;">
<span>Version 17.0.1.0.2</span><span class="px-2">|</span>
<span style="color: #714B67;font-weight: 600;">Released on: June 15, 2024</span>
</div>
<p class="m-0"
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Fixed the error in printing the receipt.</p>
<p class="m-0" style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Fix the receipt selection for each point of sales.
</p>
</div>
</div>
<div class="col-mg-12 active" style="padding: 1rem 4rem;">
<div class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;"><span>Version
17.0.1.0.0</span><span class="px-2">|</span><span
style="color: #714B67;font-weight: 600;">Released on: May 21, 2024</span>
<div class="py-3" style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;">
<span>Version 17.0.1.0.3</span><span class="px-2">|</span>
<span style="color: #714B67;font-weight: 600;">Released on: June 15, 2024</span>
</div>
<p class="m-0"
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Fix the receipt selection for each point of sales.</p>
<p class="m-0" style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Move the configuration to select the receipt from configuration settings to POS configuration.
</p>
</div>
</div>
</div>
@ -328,7 +337,7 @@
<img src="assets/modules/1.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Odoo17 Invoice Format Editor</p>
<p class="text-center pt-2 text-black font-weight-bold">Invoice Format Editor</p>
</div>
</a>
</div>
@ -354,7 +363,7 @@
<img src="assets/modules/3.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Pos Product Magnify Image</p>
<p class="text-center pt-2 text-black font-weight-bold">POS Product Magnify Image</p>
</div>
</a>
</div>
@ -391,12 +400,12 @@
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/17.0/pos_mrp_order/" style="color: #000; text-decoration: none;">
<a href="https://apps.odoo.com/apps/modules/17.0/odoo_advanced_chatter/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px;">
<img src="assets/modules/6.png" alt="" width="100%" height="auto">
<img src="assets/modules/6.jpg" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Make MRP Orders from POS</p>
<p class="text-center pt-2 text-black font-weight-bold">Odoo Advanced Chatter</p>
</div>
</a>
</div>

168
custom_receipts_for_pos/static/src/xml/order_receipt.xml

@ -2,167 +2,13 @@
<!--Inherit point_of_sale.OrderReceipt for getting our custom receipt design-->
<templates id="template" xml:space="preserve">
<t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension">
<xpath expr="//div[hasclass('pos-receipt')]" position="replace">
<div class="pos-receipt">
<t t-if="isTrue">
<ReceiptHeader data="props.data.headerData"/>
<OrderWidget lines="props.data.orderlines" t-slot-scope="scope">
<t t-set="line" t-value="scope.line"/>
<Orderline line="omit(scope.line, 'customerNote')"
class="{ 'pe-none': true }">
<li t-if="line.customerNote"
class="customer-note w-100 p-2 my-1 rounded text-break">
<i class="fa fa-sticky-note me-1" role="img"
aria-label="Customer Note" title="Customer Note"/>
<t t-esc="line.customerNote"/>
</li>
<ul t-if="line.pack_lot_lines">
<li t-foreach="line.pack_lot_lines" t-as="lot"
t-key="lot.cid">
<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>
</OrderWidget>
<!-- Total -->
<div class="pos-receipt-right-align">--------</div>
<br/>
<div class="pos-receipt-amount">
TOTAL
<span t-esc="props.formatCurrency(props.data.amount_total)"
class="pos-receipt-right-align"/>
</div>
<t t-if="props.data.rounding_applied">
<div class="pos-receipt-amount">
Rounding
<span t-esc='props.formatCurrency(props.data.rounding_applied)'
class="pos-receipt-right-align"/>
</div>
<div class="pos-receipt-amount">To Pay
<span t-esc='props.formatCurrency(props.data.amount_total + props.data.rounding_applied)'
class="pos-receipt-right-align"/>
</div>
</t>
<br/>
<br/>
<!-- Payment Lines -->
<div class="paymentlines" t-foreach="props.data.paymentlines"
t-as="line" t-key="line_index">
<t t-esc="line.name"/>
<span t-esc="props.formatCurrency(line.amount, false)"
class="pos-receipt-right-align"/>
</div>
<div class="pos-receipt-amount receipt-change mt-2">
CHANGE
<span t-esc="props.formatCurrency(props.data.change)"
class="pos-receipt-right-align"/>
</div>
<!-- Extra Payment Info -->
<t t-if="props.data.total_discount">
<div>
Discounts
<span t-esc="props.formatCurrency(props.data.total_discount)"
class="pos-receipt-right-align"/>
</div>
</t>
<div t-if="props.data.tax_details.length > 0"
class="pos-receipt-taxes">
<span/>
<span>TAX%</span>
<span>Tax</span>
<span>Base</span>
<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-if="props.data.tax_details.length > 1">
<span/>
<span/>
<span t-esc="props.formatCurrency(props.data.amount_tax, false)"/>
<span t-esc="props.formatCurrency(props.data.total_without_tax, false)"/>
<span t-esc="props.formatCurrency(props.data.amount_total, false)"/>
</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>
<img id="posqrcode" t-att-src="props.data.pos_qr_code"
class="pos-receipt-logo"/>
</div>
<div t-if="props.data.ticket_code">
<br/>
<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 class="pos-receipt-order-data">
Unique Code: <t t-out="props.data.ticket_code"/>
</div>
</div>
<!-- Footer -->
<div t-if="props.data.footer" class="pos-receipt-center-align"
style="white-space:pre-line">
<br/>
<t t-esc="props.data.footer"/>
<br/>
<br/>
</div>
<div class="after-footer">
<t t-foreach="props.data.paymentlines" t-as="line"
t-key="line_index">
<t t-if="line.ticket">
<br/>
<div class="pos-payment-terminal-receipt">
<pre t-esc="line.ticket"/>
</div>
</t>
</t>
</div>
<br/>
<t t-if="props.shippingDate">
<div class="pos-receipt-order-data">
Expected delivery:
<div><t t-esc="props.shippingDate" /></div>
</div>
</t>
<br/>
<div class="pos-receipt-order-data">
<p>Odoo Point of Sale</p>
<div t-esc="props.data.name"/>
<div t-esc="props.data.date"/>
</div>
</t>
<t t-else="">
<t t-component="templateComponent" t-props="templateProps"/>
</t>
</div>
<xpath expr="//div[hasclass('pos-receipt')]" position="attributes">
<attribute name="t-if">isTrue</attribute>
</xpath>
<xpath expr="//div[hasclass('pos-receipt')]" position="after">
<t t-else="">
<t t-component="templateComponent" t-props="templateProps"/>
</t>
</xpath>
</t>
</templates>

22
custom_receipts_for_pos/views/pos_config_views.xml

@ -0,0 +1,22 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<!-- Inherits `pos.config` form view to add the new fields for the configuration for custom receipt design -->
<record id="pos_config_view_form" model="ir.ui.view">
<field name="name">pos.config.view.form.inherit.custom.receipts.for.pos</field>
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.pos_config_view_form"/>
<field name="arch" type="xml">
<xpath expr="//setting[@id='other_devices']" position="after">
<setting title="Customize the POS receipts" string="Custom Receipt" help="Use custom receipt designs">
<field name="is_custom_receipt"/>
<div class="content-group mt16">
<field name="receipt_design" invisible="not is_custom_receipt"/>
</div>
<div class="content-group mt16">
<field name="design_receipt" invisible="1"/>
</div>
</setting>
</xpath>
</field>
</record>
</odoo>

34
custom_receipts_for_pos/views/res_config_settings_views.xml

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Inherit res.config.settings for giving the fields in configuration
settings-->
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.custom.receipts.for.pos</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="95"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//block[@id='pos_bills_and_receipts_section']" position="after">
<div class="row mt16 o_settings_container" id="pos_receipts_section">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="pos_is_custom_receipt"/>
</div>
<div class="o_setting_right_pane">
<label for="pos_receipt_design"/>
<div class="text-muted">
Use Custom Receipt Design
</div>
<div class="content-group mt16">
<field name="pos_receipt_design" invisible="not pos_is_custom_receipt" required="pos_is_custom_receipt"/>
</div>
<div class="content-group mt16">
<field name="pos_design_receipt" invisible="1"/>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save