diff --git a/pos_receipt_extend/README.rst b/pos_receipt_extend/README.rst new file mode 100644 index 000000000..2de1d1c26 --- /dev/null +++ b/pos_receipt_extend/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/License-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +ADVANCED POS RECEIPT +==================== +Advanced POS receipt with customer details and invoice details by enabling the field in pos settings in odoo15 + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +( https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +Developers : (V15) Fathima Mazlin AM , Dhanya Babu, Jumana Jabin MP +Contact : odoo@cybrosys.com + +Company +------- +* `Cybrosys Techno Solutions `__ + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png +:target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/pos_receipt_extend/__init__.py b/pos_receipt_extend/__init__.py new file mode 100644 index 000000000..7b2c59c1c --- /dev/null +++ b/pos_receipt_extend/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/pos_receipt_extend/__manifest__.py b/pos_receipt_extend/__manifest__.py new file mode 100644 index 000000000..2c0055490 --- /dev/null +++ b/pos_receipt_extend/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Advanced POS Receipt", + 'version': "15.0.1.0.0", + 'category': "Point of Sale", + 'summary': "Advanced POS Receipt with Customer Details and Invoice " + "Details", + 'description': "Advanced POS Receipt with Customer Details and Invoice " + "Details refers to a sophisticated and highly developed " + "Point of Sale (POS) receipt system that incorporates " + "comprehensive information about the customer and detailed " + "invoice specifics. ", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['point_of_sale', 'sale', 'account', 'web'], + 'data': [ + 'views/pos_config_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'web/static/lib/zxing-library/zxing-library.js', + 'pos_receipt_extend/static/src/js/payment.js', + ], + 'web.assets_qweb': [ + 'pos_receipt_extend/static/src/xml/order_receipt_templates.xml', + ] + }, + 'images': ['static/description/banner.jpg',], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_receipt_extend/doc/RELEASE_NOTES.md b/pos_receipt_extend/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..82f90f429 --- /dev/null +++ b/pos_receipt_extend/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.10.2023 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for Advanced POS Receipt diff --git a/pos_receipt_extend/models/__init__.py b/pos_receipt_extend/models/__init__.py new file mode 100644 index 000000000..031abe8d8 --- /dev/null +++ b/pos_receipt_extend/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import account_move +from . import pos_config +from . import pos_order diff --git a/pos_receipt_extend/models/account_move.py b/pos_receipt_extend/models/account_move.py new file mode 100644 index 000000000..80ca30c99 --- /dev/null +++ b/pos_receipt_extend/models/account_move.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +# ############################################################################# +import math +import re +from odoo import api, fields, models + + +class AccountMove(models.Model): + """Extends the 'account.move' model to include additional fields and + methods for managing account barcodes.""" + _inherit = "account.move" + + account_barcode = fields.Char(string='Account Barcode', + help='Enter the barcode associated with this' + 'account.') + + @api.model + def create(self, vals): + """Changed variable name from res.account_barcode to + self.account_barcode""" + res = super(AccountMove, self).create(vals) + ean = self.generate_ean(str(res.id)) + self.account_barcode = ean + return res + + def ean_checksum(self, ean_code): + """Returns the checksum of an ean string of length 13, returns -1 if + the string has the wrong length.""" + if len(ean_code) != 13: + return -1 + odd_sum = 0 + even_sum = 0 + ean_value = ean_code + reverse_value = ean_value[::-1] + final_ean = reverse_value[1:] + for i in range(len(final_ean)): + if i % 2 == 0: + odd_sum += int(final_ean[i]) + else: + even_sum += int(final_ean[i]) + total = (odd_sum * 3) + even_sum + check = int(10 - math.ceil(total % 10.0)) % 10 + return check + + def check_ean(self, ean_code): + """Returns True if ean_code is a valid ean13 string, or null""" + if not ean_code: + return True + if len(ean_code) != 13: + return False + try: + int(ean_code) + except: + return False + return self.ean_checksum(ean_code) == int(ean_code[-1]) + + def generate_ean(self, ean): + """Creates and returns a valid ean13 from an invalid one""" + if not ean: + return "0000000000000" + ean_code = re.sub("[A-Za-z]", "0", ean) + ean_code = re.sub("[^0-9]", "", ean_code) + ean_code = ean_code[:13] + if len(ean_code) < 13: + ean_code = ean_code + '0' * (13 - len(ean_code)) + return ean_code[:-1] + str(self.ean_checksum(ean_code)) diff --git a/pos_receipt_extend/models/pos_config.py b/pos_receipt_extend/models/pos_config.py new file mode 100644 index 000000000..bf0c71240 --- /dev/null +++ b/pos_receipt_extend/models/pos_config.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +# ############################################################################# +from odoo import fields, models + + +class PosConfig(models.Model): + """Inherited this module to add these boolean field""" + _inherit = "pos.config" + + is_qr_code = fields.Boolean(string='Order QRCode', + help='Enable this field to show the ' + 'qr code to pos receipt') + is_invoice_number = fields.Boolean(string='Invoice Number', + help='Enable this field to show the ' + 'invoice number to pos receipt') + is_customer_details = fields.Boolean(string='Customer Details', + help='Enable this field to show the ' + 'customer number to pos receipt') + is_customer_name = fields.Boolean(string='Customer Name', + help='Enable this field to show ' + 'the customer name to pos receipt') + is_customer_address = fields.Boolean(string='Customer Address', + help='Enable this field to show ' + 'the customer address code to ' + 'pos receipt') + is_customer_mobile = fields.Boolean(string='Customer Mobile', + help='Enable this field to show the ' + 'customer mobile to pos receipt') + is_customer_phone = fields.Boolean(string='Customer Phone', + help='Enable this field to show the ' + 'customer phone to pos receipt') + is_customer_email = fields.Boolean(string='Customer Email', + help='Enable this field to show the ' + 'customer email to pos receipt') + is_customer_vat = fields.Boolean(string='Customer VAT', + help='Enable this field to show the ' + 'customer vat to pos receipt') diff --git a/pos_receipt_extend/models/pos_order.py b/pos_receipt_extend/models/pos_order.py new file mode 100644 index 000000000..f810baf4a --- /dev/null +++ b/pos_receipt_extend/models/pos_order.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +# ############################################################################# +from odoo import api, models +try: + import qrcode +except ImportError: + qrcode = None +try: + import base64 +except ImportError: + base64 = None + + +class PosOrder(models.Model): + """Inherited this model to create a function to get the corresponding + invoice for pos order""" + _inherit = 'pos.order' + + @api.model + def get_invoice(self, id): + """Retrieve the corresponding invoice details based on the provided ID. + Args: + id (int): The ID of the invoice. + Returns: + dict: A dictionary containing the invoice details. + """ + pos_id = self.search([('pos_reference', '=', id)]) + base_url = self.env['ir.config_parameter'].get_param('web.base.url') + invoice_id = self.env['account.move'].search( + [('invoice_origin', '=', pos_id.name)]) + return { + 'invoice_id': invoice_id.id, + 'invoice_name': invoice_id.name, + 'base_url': base_url, + 'is_qr_code': invoice_id.account_barcode} diff --git a/pos_receipt_extend/static/description/assets/icons/check.png b/pos_receipt_extend/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/check.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/chevron.png b/pos_receipt_extend/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/chevron.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/cogs.png b/pos_receipt_extend/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/cogs.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/consultation.png b/pos_receipt_extend/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/consultation.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/ecom-black.png b/pos_receipt_extend/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/ecom-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/education-black.png b/pos_receipt_extend/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/education-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/hotel-black.png b/pos_receipt_extend/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/hotel-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/license.png b/pos_receipt_extend/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/license.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/lifebuoy.png b/pos_receipt_extend/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/manufacturing-black.png b/pos_receipt_extend/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/pos-black.png b/pos_receipt_extend/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/pos-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/puzzle.png b/pos_receipt_extend/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/puzzle.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/restaurant-black.png b/pos_receipt_extend/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/service-black.png b/pos_receipt_extend/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/service-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/trading-black.png b/pos_receipt_extend/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/trading-black.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/training.png b/pos_receipt_extend/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/training.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/update.png b/pos_receipt_extend/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/update.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/user.png b/pos_receipt_extend/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/user.png differ diff --git a/pos_receipt_extend/static/description/assets/icons/wrench.png b/pos_receipt_extend/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_receipt_extend/static/description/assets/icons/wrench.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/categories.png b/pos_receipt_extend/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/categories.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/check-box.png b/pos_receipt_extend/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/check-box.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/compass.png b/pos_receipt_extend/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/compass.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/corporate.png b/pos_receipt_extend/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/corporate.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/customer-support.png b/pos_receipt_extend/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/customer-support.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/cybrosys-logo.png b/pos_receipt_extend/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/features.png b/pos_receipt_extend/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/features.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/logo.png b/pos_receipt_extend/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/logo.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/pictures.png b/pos_receipt_extend/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/pictures.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/pie-chart.png b/pos_receipt_extend/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/pie-chart.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/right-arrow.png b/pos_receipt_extend/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/right-arrow.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/star.png b/pos_receipt_extend/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/star.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/support.png b/pos_receipt_extend/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/support.png differ diff --git a/pos_receipt_extend/static/description/assets/misc/whatsapp.png b/pos_receipt_extend/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/misc/whatsapp.png differ diff --git a/pos_receipt_extend/static/description/assets/modules/1.jpg b/pos_receipt_extend/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..e7985dc61 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/modules/1.jpg differ diff --git a/pos_receipt_extend/static/description/assets/modules/2.png b/pos_receipt_extend/static/description/assets/modules/2.png new file mode 100644 index 000000000..5c8646fae Binary files /dev/null and b/pos_receipt_extend/static/description/assets/modules/2.png differ diff --git a/pos_receipt_extend/static/description/assets/modules/3.png b/pos_receipt_extend/static/description/assets/modules/3.png new file mode 100644 index 000000000..3a5ffa0f9 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/modules/3.png differ diff --git a/pos_receipt_extend/static/description/assets/modules/4.jpg b/pos_receipt_extend/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..31f0a1878 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/modules/4.jpg differ diff --git a/pos_receipt_extend/static/description/assets/modules/5.png b/pos_receipt_extend/static/description/assets/modules/5.png new file mode 100644 index 000000000..258bf213d Binary files /dev/null and b/pos_receipt_extend/static/description/assets/modules/5.png differ diff --git a/pos_receipt_extend/static/description/assets/modules/6.png b/pos_receipt_extend/static/description/assets/modules/6.png new file mode 100644 index 000000000..5713b11f6 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/modules/6.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/1.png b/pos_receipt_extend/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..7ebec29d8 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/1.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/2.png b/pos_receipt_extend/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..70113f2e1 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/2.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/3.png b/pos_receipt_extend/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..563bde736 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/3.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/4.png b/pos_receipt_extend/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..e60ce3729 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/4.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/5.png b/pos_receipt_extend/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..97952093a Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/5.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/6.png b/pos_receipt_extend/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..0387b2b6a Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/6.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/7.png b/pos_receipt_extend/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..ba0883cc7 Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/7.png differ diff --git a/pos_receipt_extend/static/description/assets/screenshots/hero.gif b/pos_receipt_extend/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..e8318d90e Binary files /dev/null and b/pos_receipt_extend/static/description/assets/screenshots/hero.gif differ diff --git a/pos_receipt_extend/static/description/banner.jpg b/pos_receipt_extend/static/description/banner.jpg new file mode 100644 index 000000000..db167c69e Binary files /dev/null and b/pos_receipt_extend/static/description/banner.jpg differ diff --git a/pos_receipt_extend/static/description/icon.png b/pos_receipt_extend/static/description/icon.png new file mode 100644 index 000000000..918cae127 Binary files /dev/null and b/pos_receipt_extend/static/description/icon.png differ diff --git a/pos_receipt_extend/static/description/index.html b/pos_receipt_extend/static/description/index.html new file mode 100644 index 000000000..5f1645ea3 --- /dev/null +++ b/pos_receipt_extend/static/description/index.html @@ -0,0 +1,581 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.Sh +
+
+
+ +
+
+
+ +

ADVANCED POS RECEIPT +

+

Advanced POS Receipt with Customer Details, Invoice Details and QR Code

+ + +
+
+
+ + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps you to get Advanced POS receipt that contains more information about the customer details and invoice details. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + POS Receipt with Customer Information +
+
+ + Receipts can Include Invoice Information. +
+
+
+ +
+ + Available in Odoo 15 + Community , Enterprise and Odoo.Sh . +
+ +
+ + Information about the Invoice is Provided in the QR Code. +
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Enable Customer Details from Settings +

+

Go to Point of Sale -> settings + -> + We can enable the checkbox for Customer Details, and we can enable the required data to visible in the receipt +

+ +
+ +
+

Customer Details in Receipt +

+

+ Create a receipt and see the changes

+ +
+ +
+

Invoice Number inside Receipt +

+

+ Go to Point of Sale -> settings , + We can enable the checkbox for Invoice Number to view invoice number on the Receipt +

+ +
+ +
+

Invoice Number in Receipt +

+

Before creating the receipt , You should choose the Invoice from Payment Screen +

+ +

+ Create a receipt , Close the Debug Window and see the changes

+ +
+ +
+ + +

Order QRCode in Receipt +

+

+ Go to Point of Sale -> settings , + We can enable the checkbox for Order QRCode to view invoice Details of the Order.

+ + +

QR code in Receipt +

+

+ Create a receipt , Close the Debug Window and see the changes

+ +
+
+
+ + + +
+
+ +
+

Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/pos_receipt_extend/static/src/js/payment.js b/pos_receipt_extend/static/src/js/payment.js new file mode 100644 index 000000000..f53ba7993 --- /dev/null +++ b/pos_receipt_extend/static/src/js/payment.js @@ -0,0 +1,52 @@ +odoo.define('pos_receipt_extend.PaymentScreen', function (require) { + 'use strict'; + var rpc = require('web.rpc') + const PaymentScreen = require('point_of_sale.PaymentScreen'); + const Registries = require('point_of_sale.Registries'); + var models = require('point_of_sale.models'); + // Load models to retrieve configuration and account move data + // Load 'pos.config' model fields + models.load_models([{ + model: 'pos.config', + fields: ['is_customer_details', 'is_customer_name', 'is_customer_address', 'is_customer_mobile', 'is_customer_phone', 'is_customer_email', 'is_customer_vat', 'is_qr_code', 'is_invoice_number'], + loaded: function (self, pos_config) { + self.pos_config = pos_config; + } + }]); + // Load 'account.move' model fields + models.load_models([{ + model: 'account.move', + fields: ['name'], + loaded: function (self, account_move) { + self.account_move = account_move; + } + }]); + // Define the extended PaymentScreen component + const PosPaymentReceiptExtend = PaymentScreen => class extends PaymentScreen { + setup() { + super.setup(); + } + async validateOrder(isForceValidate) { + // Retrieve receipt number from the selected order + var receipt_number = this.env.pos._previousAttributes.selectedOrder.name + const receipt_order = await super.validateOrder(...arguments); + // Generate QR code and store it + const codeWriter = new window.ZXing.BrowserQRCodeSvgWriter(); + var self = this; + rpc.query({ + model: 'pos.order', + method: 'get_invoice', + args: [receipt_number] + }).then(function (result) { + self.env.pos.inv = result['invoice_name'] + const address = `${result.base_url}/my/invoices/${result.invoice_id}?` + let qr_code_svg = new XMLSerializer().serializeToString(codeWriter.write(address, 150, 150)); + self.env.pos.qr_image = "data:image/svg+xml;base64," + window.btoa(qr_code_svg); + }); + return receipt_order + } + } + // Extend the PaymentScreen component with the custom functionality + Registries.Component.extend(PaymentScreen, PosPaymentReceiptExtend); + return PaymentScreen; +}); diff --git a/pos_receipt_extend/static/src/xml/order_receipt_templates.xml b/pos_receipt_extend/static/src/xml/order_receipt_templates.xml new file mode 100644 index 000000000..815ae8156 --- /dev/null +++ b/pos_receipt_extend/static/src/xml/order_receipt_templates.xml @@ -0,0 +1,62 @@ + + + + + + + + + + +
Customer Name: + +
+
+ +
Customer Address: + +
+
+ +
Customer Mobile: + +
+
+ +
Customer Phone: + +
+
+ +
Customer Email: + +
+
+ +
Customer Vat: + +
+
+
+
+ + +
Invoice Number: + +
+
+
+ + +
+ +
+
+
+
+
+
diff --git a/pos_receipt_extend/views/pos_config_views.xml b/pos_receipt_extend/views/pos_config_views.xml new file mode 100644 index 000000000..f9ec21785 --- /dev/null +++ b/pos_receipt_extend/views/pos_config_views.xml @@ -0,0 +1,114 @@ + + + + + pos.config.view.form.inherit.pos.receipt.extend + + pos.config + + + +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+