diff --git a/simplified_pos/README.rst b/simplified_pos/README.rst new file mode 100755 index 000000000..ceff28ddb --- /dev/null +++ b/simplified_pos/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + + +Simplified POS +=============== +This module provides all aspects of pos on a single page in Odoo. + +Configuration +============= +* No Additional configuration is needed. + +License +------- +Affero General Public License, Version 3 `(AGPL-3). +`__ + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V15) Yadhu krishnan , Contact: odoo@cybrosys.com + +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/simplified_pos/__init__.py b/simplified_pos/__init__.py new file mode 100644 index 000000000..0ad0592d1 --- /dev/null +++ b/simplified_pos/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ diff --git a/simplified_pos/__manifest__.py b/simplified_pos/__manifest__.py new file mode 100644 index 000000000..c23785f05 --- /dev/null +++ b/simplified_pos/__manifest__.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +{ + 'name': 'Simplified POS', + 'version': '15.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'All aspects of pos on a single page.', + 'description': 'A straightforward point-of-sale system' + ' that enables payment, order confirmation, ' + 'and product selection all on the same page.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'assets': { + 'point_of_sale.assets': [ + 'simplified_pos/static/src/js/ProductScreen.js', + 'simplified_pos/static/src/js/ConfirmationPopup.js', + 'simplified_pos/static/src/js/PrintPopup.js', + 'simplified_pos/static/src/js/ProductScreenPaymentLine.js', + 'simplified_pos/static/src/js/ProductWidgetSimple.js', + 'simplified_pos/static/src/scss/pos.scss' + ], + 'web.assets_qweb': [ + 'simplified_pos/static/src/xml/ProductScreen.xml', + 'simplified_pos/static/src/xml/ActionpadWidget.xml', + 'simplified_pos/static/src/xml/ConfirmationPopup.xml', + 'simplified_pos/static/src/xml/PrintPopup.xml', + 'simplified_pos/static/src/xml/PaymentScreenPaymentLine.xml', + 'simplified_pos/static/src/xml/chrome.xml', + 'simplified_pos/static/src/xml/ProductWidgetControlPanel.xml', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/simplified_pos/doc/RELEASE_NOTES.md b/simplified_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..fd1e0e5ad --- /dev/null +++ b/simplified_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 10.08.2023 +#### Version 15.0.1.0.0 +#### ADD + +- Initial commit for Simplified POS diff --git a/simplified_pos/static/description/assets/icons/check.png b/simplified_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/simplified_pos/static/description/assets/icons/check.png differ diff --git a/simplified_pos/static/description/assets/icons/chevron.png b/simplified_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/simplified_pos/static/description/assets/icons/chevron.png differ diff --git a/simplified_pos/static/description/assets/icons/cogs.png b/simplified_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/simplified_pos/static/description/assets/icons/cogs.png differ diff --git a/simplified_pos/static/description/assets/icons/consultation.png b/simplified_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/simplified_pos/static/description/assets/icons/consultation.png differ diff --git a/simplified_pos/static/description/assets/icons/ecom-black.png b/simplified_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/simplified_pos/static/description/assets/icons/ecom-black.png differ diff --git a/simplified_pos/static/description/assets/icons/education-black.png b/simplified_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/simplified_pos/static/description/assets/icons/education-black.png differ diff --git a/simplified_pos/static/description/assets/icons/hotel-black.png b/simplified_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/simplified_pos/static/description/assets/icons/hotel-black.png differ diff --git a/simplified_pos/static/description/assets/icons/license.png b/simplified_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/simplified_pos/static/description/assets/icons/license.png differ diff --git a/simplified_pos/static/description/assets/icons/lifebuoy.png b/simplified_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/simplified_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/simplified_pos/static/description/assets/icons/manufacturing-black.png b/simplified_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/simplified_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/simplified_pos/static/description/assets/icons/pos-black.png b/simplified_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/simplified_pos/static/description/assets/icons/pos-black.png differ diff --git a/simplified_pos/static/description/assets/icons/puzzle.png b/simplified_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/simplified_pos/static/description/assets/icons/puzzle.png differ diff --git a/simplified_pos/static/description/assets/icons/restaurant-black.png b/simplified_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/simplified_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/simplified_pos/static/description/assets/icons/service-black.png b/simplified_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/simplified_pos/static/description/assets/icons/service-black.png differ diff --git a/simplified_pos/static/description/assets/icons/trading-black.png b/simplified_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/simplified_pos/static/description/assets/icons/trading-black.png differ diff --git a/simplified_pos/static/description/assets/icons/training.png b/simplified_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/simplified_pos/static/description/assets/icons/training.png differ diff --git a/simplified_pos/static/description/assets/icons/update.png b/simplified_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/simplified_pos/static/description/assets/icons/update.png differ diff --git a/simplified_pos/static/description/assets/icons/user.png b/simplified_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/simplified_pos/static/description/assets/icons/user.png differ diff --git a/simplified_pos/static/description/assets/icons/wrench.png b/simplified_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/simplified_pos/static/description/assets/icons/wrench.png differ diff --git a/simplified_pos/static/description/assets/misc/categories.png b/simplified_pos/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/categories.png differ diff --git a/simplified_pos/static/description/assets/misc/check-box.png b/simplified_pos/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/check-box.png differ diff --git a/simplified_pos/static/description/assets/misc/compass.png b/simplified_pos/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/simplified_pos/static/description/assets/misc/compass.png differ diff --git a/simplified_pos/static/description/assets/misc/corporate.png b/simplified_pos/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/simplified_pos/static/description/assets/misc/corporate.png differ diff --git a/simplified_pos/static/description/assets/misc/customer-support.png b/simplified_pos/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/simplified_pos/static/description/assets/misc/customer-support.png differ diff --git a/simplified_pos/static/description/assets/misc/cybrosys-logo.png b/simplified_pos/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/simplified_pos/static/description/assets/misc/cybrosys-logo.png differ diff --git a/simplified_pos/static/description/assets/misc/features.png b/simplified_pos/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/features.png differ diff --git a/simplified_pos/static/description/assets/misc/logo.png b/simplified_pos/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/simplified_pos/static/description/assets/misc/logo.png differ diff --git a/simplified_pos/static/description/assets/misc/pictures.png b/simplified_pos/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/pictures.png differ diff --git a/simplified_pos/static/description/assets/misc/pie-chart.png b/simplified_pos/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/pie-chart.png differ diff --git a/simplified_pos/static/description/assets/misc/right-arrow.png b/simplified_pos/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/right-arrow.png differ diff --git a/simplified_pos/static/description/assets/misc/star.png b/simplified_pos/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/simplified_pos/static/description/assets/misc/star.png differ diff --git a/simplified_pos/static/description/assets/misc/support.png b/simplified_pos/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/support.png differ diff --git a/simplified_pos/static/description/assets/misc/whatsapp.png b/simplified_pos/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/simplified_pos/static/description/assets/misc/whatsapp.png differ diff --git a/simplified_pos/static/description/assets/modules/1.png b/simplified_pos/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/simplified_pos/static/description/assets/modules/1.png differ diff --git a/simplified_pos/static/description/assets/modules/2.png b/simplified_pos/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/simplified_pos/static/description/assets/modules/2.png differ diff --git a/simplified_pos/static/description/assets/modules/3.png b/simplified_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/simplified_pos/static/description/assets/modules/3.png differ diff --git a/simplified_pos/static/description/assets/modules/4.png b/simplified_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/simplified_pos/static/description/assets/modules/4.png differ diff --git a/simplified_pos/static/description/assets/modules/5.gif b/simplified_pos/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/simplified_pos/static/description/assets/modules/5.gif differ diff --git a/simplified_pos/static/description/assets/modules/6.png b/simplified_pos/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/simplified_pos/static/description/assets/modules/6.png differ diff --git a/simplified_pos/static/description/assets/screenshots/hero.gif b/simplified_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..c4be0274f Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/hero.gif differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_01.png b/simplified_pos/static/description/assets/screenshots/s_pos_01.png new file mode 100644 index 000000000..73caee7d0 Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_01.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_02.png b/simplified_pos/static/description/assets/screenshots/s_pos_02.png new file mode 100644 index 000000000..e55cae9c9 Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_02.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_03.png b/simplified_pos/static/description/assets/screenshots/s_pos_03.png new file mode 100644 index 000000000..4c2c4cdf4 Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_03.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_04.png b/simplified_pos/static/description/assets/screenshots/s_pos_04.png new file mode 100644 index 000000000..04777be1d Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_04.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_05.png b/simplified_pos/static/description/assets/screenshots/s_pos_05.png new file mode 100644 index 000000000..f4d49ba2f Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_05.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_06.png b/simplified_pos/static/description/assets/screenshots/s_pos_06.png new file mode 100644 index 000000000..64f820ce9 Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_06.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_07.png b/simplified_pos/static/description/assets/screenshots/s_pos_07.png new file mode 100644 index 000000000..7046bf1ed Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_07.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_08.png b/simplified_pos/static/description/assets/screenshots/s_pos_08.png new file mode 100644 index 000000000..67e32603e Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_08.png differ diff --git a/simplified_pos/static/description/assets/screenshots/s_pos_09.png b/simplified_pos/static/description/assets/screenshots/s_pos_09.png new file mode 100644 index 000000000..a357228d2 Binary files /dev/null and b/simplified_pos/static/description/assets/screenshots/s_pos_09.png differ diff --git a/simplified_pos/static/description/banner.png b/simplified_pos/static/description/banner.png new file mode 100644 index 000000000..88f50db1a Binary files /dev/null and b/simplified_pos/static/description/banner.png differ diff --git a/simplified_pos/static/description/icon.png b/simplified_pos/static/description/icon.png new file mode 100644 index 000000000..a058e6e0f Binary files /dev/null and b/simplified_pos/static/description/icon.png differ diff --git a/simplified_pos/static/description/index.html b/simplified_pos/static/description/index.html new file mode 100644 index 000000000..f26631078 --- /dev/null +++ b/simplified_pos/static/description/index.html @@ -0,0 +1,655 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Simplified Pos

+

+ All aspects of pos on + a single page.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ With The Help Of This App, You May Perform All Point-Of-Sale Tasks In A + Single Frame. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+ + Choosing a product, confirming an order, and making a payment all on the same page. +
+
+ + + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ A POS frame

+

+ This is the new point + of sale frame.

+ +
+ +
+

+ Product Search

+

+ We can search for + products here.

+ +
+ +
+

+ Add Products to Order + line

+

+ When a product is + clicked, it is added to the order lines and the total is + displayed beneath it. We can adjust the amount, + price, and discount using the number pad.

+ +
+ +
+

+ Add Payment + Methods

+

+ We can select the + necessary payment options, which can be shown beneath the + summary.

+ +
+ +
+

+ Choose Customer

+

+ By pressing the search + button, we may choose a customer.

+ +
+ +
+

+ Validate Order

+

+ Click this to validate + the order.

+ +
+ +
+

+ Confirm Order

+

+ Click confirm to + confirm order else click cancel.

+ +
+ +
+

+ For Printing

+

+ Click print to print + the order.

+ +
+ +
+

+ Click for New order

+

+ To access the new + order, click New Order.

+ +
+
+
+ + +
+
+ +
+

+ Suggested + 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/simplified_pos/static/src/js/ConfirmationPopup.js b/simplified_pos/static/src/js/ConfirmationPopup.js new file mode 100644 index 000000000..c3d455e52 --- /dev/null +++ b/simplified_pos/static/src/js/ConfirmationPopup.js @@ -0,0 +1,43 @@ +odoo.define('simplified_pos.ConfirmationPopup', function(require) { + 'use strict'; + const { + _lt + } = require('@web/core/l10n/translation'); + const PaymentScreen = require('point_of_sale.PaymentScreen'); + const Registries = require('point_of_sale.Registries'); + const { + useBus + } = require('@web/core/utils/hooks'); + class ConfirmationPopup extends PaymentScreen { + /*This is to add the workings inside confirmationPopup.*/ + setup() { + super.setup(); + if (this.props.confirmKey) { + useBus(this.env.posbus, `confirm-popup-${this.props.id}`, this.confirm); + } + } + async confirm(ev) { + /*Once confirm is clicked, the confirm function is activated, + and a PrintPopup is displayed, confirming the order.*/ + this.showPopup("PrintPopup", { + title: _lt('Print order'), + confirmText: _lt('Print'), + cancelText: this.env._t('Cancel'), + }); + this.validateOrder(false) + } + async getPayload() { + return null; + } + async cancel(ev) { + /*Orders are cancelled through the cancel function.*/ + window.location.reload(); + } + get nextScreen() { + return !this.error ? 'ProductScreen' : 'ProductScreen'; + } + } + ConfirmationPopup.template = 'ConfirmationPopup'; + Registries.Component.add(ConfirmationPopup); + return ConfirmationPopup; +}); \ No newline at end of file diff --git a/simplified_pos/static/src/js/PrintPopup.js b/simplified_pos/static/src/js/PrintPopup.js new file mode 100644 index 000000000..3bf04d5ee --- /dev/null +++ b/simplified_pos/static/src/js/PrintPopup.js @@ -0,0 +1,67 @@ +odoo.define('simplified_pos.PrintPopup', function(require) { + 'use strict'; + const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup'); + const Registries = require('point_of_sale.Registries'); + class PrintPopup extends AbstractAwaitablePopup { + setup() { + super.setup(); + } + async printReceipt() { + /*create a new window to hold the content to be printed*/ + var printWindow = window.open('', 'PrintWindow', 'height=600,width=400'); + /* get the HTML content of the popup, excluding the buttons*/ + var content = this.el.innerHTML; + content = content.replace(/]*>[\s\S]*<\/footer>/gi, ''); + content = content.replace(/]*>[\s\S]*<\/header>/gi, ''); + /* set the content of the new window to the modified HTML*/ + printWindow.document.write(content); + /* print the content and close the window*/ + printWindow.print(); + window.location.reload(); + } + async cancel() { + /*Orders are cancelled through the cancel function.*/ + window.location.reload(); + } + get company_details() { + return this.env.pos + } + orderlines() { + /*Selected order lines are passed to UI.*/ + var self = this; + var orderlines = this.env.pos.get_order().orderlines + var orderlinesList = [] + orderlines.forEach(function(orderlines) { + var totalprice = orderlines.price * orderlines.quantity + orderlinesList.push([orderlines.product.display_name, orderlines.quantity, orderlines.price, self.env.pos.currency.symbol+totalprice]) + }) + return orderlinesList; + } + get total() { + /*Total is calculated and passed*/ + var total = 0 + var totalvalues = this.env.pos.get_order().get_paymentlines() + totalvalues.forEach(function(totalvalues) { + total = total + totalvalues.amount + }) + return this.env.pos.currency.symbol + total; + } + get currentOrder() { + /*Get current order*/ + return this.env.pos.get_order(); + } + get paymentlines(){ + /*Get payment lines*/ + return this.currentOrder.get_paymentlines(); + } + get total_rounded(){ + /*Get rounded amount */ + var total = this.currentOrder.get_total_with_tax() + this.currentOrder.get_rounding_applied() + return this.env.pos.currency.symbol+ " "+ total + } + + } + PrintPopup.template = 'PrintPopup'; + Registries.Component.add(PrintPopup); + return PrintPopup; +}); \ No newline at end of file diff --git a/simplified_pos/static/src/js/ProductScreen.js b/simplified_pos/static/src/js/ProductScreen.js new file mode 100644 index 000000000..635e9abed --- /dev/null +++ b/simplified_pos/static/src/js/ProductScreen.js @@ -0,0 +1,108 @@ +odoo.define('simplified_pos.customer', function(require) { + const ProductScreen = require('point_of_sale.ProductScreen'); + const { + useListener + } = require('web.custom_hooks'); + const ajax = require('web.ajax'); + const Registries = require('point_of_sale.Registries'); + const { + _lt + } = require('@web/core/l10n/translation'); + const CustomerButtons = (ProductScreen) => + class extends ProductScreen { + /*Here, the ProductScreen has been extended, and some features have been overridden.*/ + setup() { + super.setup(); + useListener('new-payment-line', this.newPaymentLine); + useListener('confirm-order', this.confirmOrder); + useListener('select-line', this._selectLine); + } + get changeText() { + return this.env.pos.format_currency(this.currentOrder.get_change()); + } + get totalDueText() { + return this.env.pos.format_currency( + this.currentOrder.get_total_with_tax() + this.currentOrder.get_rounding_applied() + ); + } + get remainingText() { + return this.env.pos.format_currency( + this.currentOrder.get_due() > 0 ? this.currentOrder.get_due() : 0 + ); + } + get currentOrder() { + return this.env.pos.get_order(); + } + get_current_Order() { + return this.env.pos.get_order().get_paymentlines() + } + confirmOrder() { + /* When performing validation, this function checks the + requirements and displays an error message if any are reduced.*/ + var paymentline = this.currentOrder.paymentlines.length + var partner = this.currentOrder.get_client() + var orderlines = this.currentOrder.orderlines.length + if (orderlines == 0) { + this.showPopup('ErrorPopup', { + title: this.env._t('Error'), + body: this.env._t('Cart is empty.'), + }); + } else if (partner == null) { + this.showPopup('ErrorPopup', { + title: this.env._t('Error'), + body: this.env._t('Select a Customer.'), + }); + } else if (paymentline == 0) { + this.showPopup('ErrorPopup', { + title: this.env._t('Error'), + body: this.env._t('Select a Payment Method'), + }); + } else { + this.showPopup("ConfirmationPopup", { + title: _lt('Confirmation'), + confirmText: _lt('Confirm'), + cancelText: this.env._t('Cancel'), + }); + } + } + orderDone() { + this.currentOrder.finalize(); + const { + name, + props + } = this.nextScreen; + this.showScreen(name, props); + if (this.env.pos.config.iface_customer_facing_display) { + this.env.pos.send_current_order_to_customer_facing_display(); + } + } + newPaymentLine({ + detail: paymentMethod + }) { + let result = this.currentOrder.add_paymentline(paymentMethod); + if (result) { + this.render(true) + return true; + } else { + this.render(true) + return false; + } + } + get_payment_methods() { + return this.env.pos.payment_methods + } + get paymentLines() { + return this.env.pos.get_order().get_paymentlines(); + } + get nextScreen() { + return { + name: 'ProductScreen' + }; + } + _selectLine(event) { + this.currentOrder.select_orderline(event.detail.orderline); + } + } + Registries.Component.extend(ProductScreen, CustomerButtons); + return this; +}); \ No newline at end of file diff --git a/simplified_pos/static/src/js/ProductScreenPaymentLine.js b/simplified_pos/static/src/js/ProductScreenPaymentLine.js new file mode 100644 index 000000000..201321a84 --- /dev/null +++ b/simplified_pos/static/src/js/ProductScreenPaymentLine.js @@ -0,0 +1,41 @@ +odoo.define('simplified_pos.ProductScreenPaymentLine', function(require) { + 'use strict'; + const PaymentScreenPaymentLines = require('point_of_sale.PaymentScreenPaymentLines'); + const Registries = require('point_of_sale.Registries'); + const NumberBuffer = require('point_of_sale.NumberBuffer'); + const { + useListener + } = require("@web/core/utils/hooks"); + const ProductScreenPaymentLine = (PaymentScreenPaymentLines) => + class extends PaymentScreenPaymentLines { + /*Here PaymentScreenPaymentLines is extended.*/ + setup() { + super.setup(); + useListener('delete-payment', this.deletePayment); + useListener('select-payment-line', this.selectPaymentLine); + } + selectPaymentLine(event) { + /*This helps to select payment line in summary.*/ + const { + cid + } = event.detail; + const line = this.env.pos.get_order().get_paymentlines().find((line) => line.cid === cid); + this.env.pos.get_order().select_paymentline(line); + NumberBuffer.reset(); + this.render(true); + } + deletePayment(event) { + /*This is to delete payment lines from summary.*/ + const { + cid + } = event.detail; + const paymentline = this.env.pos.get_order().get_paymentlines().find((line) => line.cid === cid) + if (paymentline) { + this.env.pos.get_order().remove_paymentline(paymentline) + this.render(true) + } + } + }; + Registries.Component.extend(PaymentScreenPaymentLines, ProductScreenPaymentLine); + return ProductScreenPaymentLine; +}); \ No newline at end of file diff --git a/simplified_pos/static/src/js/ProductWidgetSimple.js b/simplified_pos/static/src/js/ProductWidgetSimple.js new file mode 100644 index 000000000..beb3419af --- /dev/null +++ b/simplified_pos/static/src/js/ProductWidgetSimple.js @@ -0,0 +1,27 @@ +odoo.define('simplified_pos.ProductsWidgetSimple', function(require) { + 'use strict'; + const Registries = require('point_of_sale.Registries'); + const ProductsWidget = require('point_of_sale.ProductsWidget'); + const ProductsWidgetSimple = (ProductsWidget) => + class extends ProductsWidget { + setup() { + super.setup(); + } + _switchCategory(event) { + this.env.pos.set('selectedCategoryId', event.detail); + } + get productsToDisplay() { + /* This function is override to remove products showing before hand.*/ + let list = []; + if (this.searchWord !== '') { + list = this.env.pos.db.search_product_in_category( + 0,this.searchWord); + } + return list.sort(function(a, b) { + return a.display_name.localeCompare(b.display_name) + }); + } + }; + Registries.Component.extend(ProductsWidget, ProductsWidgetSimple); + return ProductsWidgetSimple; +}); \ No newline at end of file diff --git a/simplified_pos/static/src/scss/pos.scss b/simplified_pos/static/src/scss/pos.scss new file mode 100644 index 000000000..acb2346ba --- /dev/null +++ b/simplified_pos/static/src/scss/pos.scss @@ -0,0 +1,328 @@ +.pos .leftpane { + float: left; + height: 98%; + max-height: 97vh; + display: flex; + flex-direction: column; + flex-grow: 1; + width: 30%; + border: solid 5px teal; + ; + + &::-webkit-scrollbar { + width: 0; + } +} + +.cash-move-button:hover { + background-color: teal; +} + +.header-button:hover { + background-color: teal !important; +} + +.oe_status:hover { + background-color: teal !important; +} + +.search-bar-portal { + display: none !important; +} + +.pos .subwindow .subwindow-container-fix { + height: 100%; + position: relative; + overflow-y: scroll; + ; + + &::-webkit-scrollbar { + width: 0; + } +} + +.pos .products-widget { + display: flex; + flex-direction: column; + flex-grow: 1; + height: 100%; + overflow: hidden; + ; + + &::-webkit-scrollbar { + width: 0; + } +} + +.pos .order .orderlines { + &::-webkit-scrollbar { + width: 0; + } +} + +.pos-topheader { + background: teal !important; +} + +.payment-status-container { + margin-top: 70px !important; +} + +.paymentlines-container { + height: 29% !important; +} + +.nextorder { + margin-bottom: 8px !important; + width: 29% !important; +} + +.pos .product-list-container .product-list-empty p { + margin: 10px; + text-align: center; + color: teal; + font-size: 14px; +} + +.pos .button.validation .pay-circle { + background: white; + color: teal; + width: 35px; + height: 35px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; +} + +.pos .numpad { + text-align: center; + width: 100%; + height: 100%; + margin-top: 8px; + margin-left: 0px; + border: none; + border-radius: 0; + border-top: 1px solid; + border-color: teal; + border-top-right-radius: 4px; + min-width: 216px; + margin: 0 !important; +} + +.pos .numpad button { + width: 25%; + height: 25%; + border-color: teal; + background: white; +} + +.pos .mode-button.selected-mode { + color: teal; + background: white; + border-color: teal; +} + +.pos .actionpad { + padding: 0; + text-align: center; + vertical-align: top; + border: none; + border-right: 1px solid gray; + flex-grow: 1; + width: 50%; +} + +.pos .right { + float: right; + background: white; + width: 30%; + height: 98.9%; + max-height: 97vh; + border: solid 5px teal; + box-sizing: border-box; + margin-top: 2px; + margin-bottom: 8px; +} + +.pos .customer-button { + width: 65%; + margin-bottom: 110px; + border: 2px solid teal !important; + color: teal !important; +} + +.pos .head { + color: #017e84; + font-size: 12px; + font-weight: bold; +} + +.pos .center { + background: white; + height: 100%; + max-height: 97vh; +} + +.pos ._o_customer { + text-align: justify; + margin-left: 30px; + margin-right: 30px; +} + +.pos .paymentlines-container { + padding: 16px; + padding-top: 0; + border: solid 5px teal; + min-height: 154px; + text-align: center; + padding: 50px 30px 0px 18px; + font-size: 30px; + color: #43996E; +} + +.pos p.title-category { + margin: 0; + text-align: center; + background: #ededed; + color: teal; + text-transform: uppercase; + font-weight: bold; + font-size: 15px; + order: 1; + height: 23px; + padding-top: 4px; + +} + +.pos .payment-status-total-due { + font-size: 17px; + padding-top: 12px; + padding-bottom: 12px; + color: gray; + padding-left: 100px; +} + +.pos .payment-status-container { + display: flex; + justify-content: center; + font-size: 25px; + padding-top: 15px; +} + +.pos .button.validation { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + height: calc(var(--btn-height-size) * 2.3); + border: none; + background: teal; + color: #fff; + font-size: 14px; + font-weight: bold; + transition: all 150ms linear; + background: #39B8B8 !important; + margin-bottom: 13px !important; + height: 11.85%; +} + +.pos .amount-paymentmethod { + padding-left: 40%; +} + +.pos .delete-button { + padding-left: 30%; +} + +.pos .form-container { + max-width: 450px; + padding: 30px; + background-color: white; +} + +.pos .orderlinesactionpad-receipt { + font-size: 15px; + text-align: left; + margin-left: 35px; +} + +.highlight { + width: 29.45% !important; +} + +.next { + border-bottom: solid 5px teal !important; +} + +.paymentmethods-container { + overflow: scroll; + height: 48%; + + &::-webkit-scrollbar { + width: 0; + } +} + +.pos .nextorder { + position: absolute; + width: 28.3%; + bottom: 0; +} + +.pos .search-bar-container.sb-product { + max-width: 100%; + width: 100%; + -webkit-box-pack: start; + justify-content: center; + height: 100%; + min-height: 48px; + display: flex; + position: relative; + flex: 1; + align-items: center; +} + +.pos .search-bar-container.sb-product input { + flex: 1; + font-size: medium; + height: 100%; + border: none; + color: #63717f; + padding-left: 38px; + padding-right: 38px; + border-radius: 5px; +} + +.pos .search-bar-container.sb-product input:focus-visible { + outline: none; +} + +.pos .search-bar-container.sb-product .icon { + position: absolute; + left: 0; + margin-left: 4px; + z-index: 1; + color: #4f5b66; + font-size: 15px; + margin-left: 15px; +} + +.pos .search-bar-container.sb-product .clear-icon { + position: absolute; + right: 13px; + margin-left: 28%; + color: #4f5b66; + cursor: pointer; +} + +.pos .button.new-order { + background: #39b8b8 !important; + position: absolute; + align-items: center; + justify-content: center; + display: grid; + bottom: 13px; + width: 29.15% !important; + height: 11.5%; +} \ No newline at end of file diff --git a/simplified_pos/static/src/xml/ActionpadWidget.xml b/simplified_pos/static/src/xml/ActionpadWidget.xml new file mode 100644 index 000000000..fabfab464 --- /dev/null +++ b/simplified_pos/static/src/xml/ActionpadWidget.xml @@ -0,0 +1,17 @@ + + + + + + + + + \ No newline at end of file diff --git a/simplified_pos/static/src/xml/ConfirmationPopup.xml b/simplified_pos/static/src/xml/ConfirmationPopup.xml new file mode 100644 index 000000000..1dfc5fa6f --- /dev/null +++ b/simplified_pos/static/src/xml/ConfirmationPopup.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/simplified_pos/static/src/xml/PaymentScreenPaymentLine.xml b/simplified_pos/static/src/xml/PaymentScreenPaymentLine.xml new file mode 100644 index 000000000..ad0a90e83 --- /dev/null +++ b/simplified_pos/static/src/xml/PaymentScreenPaymentLine.xml @@ -0,0 +1,11 @@ + + + + + +
+ +
+
+
+
\ No newline at end of file diff --git a/simplified_pos/static/src/xml/PrintPopup.xml b/simplified_pos/static/src/xml/PrintPopup.xml new file mode 100644 index 000000000..e7f362ed4 --- /dev/null +++ b/simplified_pos/static/src/xml/PrintPopup.xml @@ -0,0 +1,136 @@ + + + + + + + \ No newline at end of file diff --git a/simplified_pos/static/src/xml/ProductScreen.xml b/simplified_pos/static/src/xml/ProductScreen.xml new file mode 100644 index 000000000..aab9f3c5f --- /dev/null +++ b/simplified_pos/static/src/xml/ProductScreen.xml @@ -0,0 +1,106 @@ + + \ No newline at end of file diff --git a/simplified_pos/static/src/xml/ProductWidgetControlPanel.xml b/simplified_pos/static/src/xml/ProductWidgetControlPanel.xml new file mode 100644 index 000000000..810701ebb --- /dev/null +++ b/simplified_pos/static/src/xml/ProductWidgetControlPanel.xml @@ -0,0 +1,24 @@ + + + + + +
+
+ + + + + + + + + +