diff --git a/simplified_pos/README.rst b/simplified_pos/README.rst new file mode 100755 index 000000000..b17d57add --- /dev/null +++ b/simplified_pos/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://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 +------- +General Public License, Version 3 (AGPL-3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: Swetha Anand @cybrosys, 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..e063a185d --- /dev/null +++ b/simplified_pos/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Swetha Anand (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..2dff409cc --- /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: Swetha Anand (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': '16.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', + 'images': ['static/description/banner.jpg'], + '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', + 'simplified_pos/static/src/xml/ProductScreen.xml', + 'simplified_pos/static/src/xml/OrderWidget.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/ProductWidgetControlPanel.xml', + 'simplified_pos/static/src/xml/chrome.xml', + ] + }, + '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..93708f28b --- /dev/null +++ b/simplified_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module +#### 01.07.2023 +#### Version 16.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.gif b/simplified_pos/static/description/assets/modules/1.gif new file mode 100644 index 000000000..db040e0de Binary files /dev/null and b/simplified_pos/static/description/assets/modules/1.gif 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..3415917c2 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..a29119785 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..b55ddc812 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.png b/simplified_pos/static/description/assets/modules/5.png new file mode 100644 index 000000000..25ed3e0b6 Binary files /dev/null and b/simplified_pos/static/description/assets/modules/5.png 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..15b141248 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..729771455 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..555dfac12 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..d7d3f2a6d 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..e21a2d3c4 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..ae218764b 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..c57abf255 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..c5a4f0628 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..ea2625af7 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..ab39944b3 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..1acb82b4b 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.jpg b/simplified_pos/static/description/banner.jpg new file mode 100644 index 000000000..9ce3e0cf4 Binary files /dev/null and b/simplified_pos/static/description/banner.jpg differ diff --git a/simplified_pos/static/description/icon.png b/simplified_pos/static/description/icon.png new file mode 100644 index 000000000..c835366a0 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..6b7ba8ee7 --- /dev/null +++ b/simplified_pos/static/description/index.html @@ -0,0 +1,686 @@ +
+ +
+ +
+
+ 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.

+ +
+ +
+

+ Click

+

+ Click this to validate + the order.

+ +
+ +
+

+ Click

+

+ Click confirm to + confirm order else click cancel.

+ +
+ +
+

+ Click

+

+ Click print to print + the order.

+ +
+ +
+

+ Click 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..cdd716900 --- /dev/null +++ b/simplified_pos/static/src/js/ConfirmationPopup.js @@ -0,0 +1,44 @@ +odoo.define('point_of_sale.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) + this.env.posbus.trigger('close-popup', { + popupId: this.props.id, + response: { confirmed: true, payload: await this.getPayload() }, + }); + } + 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..516d55424 --- /dev/null +++ b/simplified_pos/static/src/js/PrintPopup.js @@ -0,0 +1,51 @@ +odoo.define('point_of_sale.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 orderlines() { + /*Selected order lines are passed to UI.*/ + var orderlines = this.env.pos.selectedOrder.orderlines + var orderlinesList = [] + orderlines.forEach(function (orderlines) { + var totalprice = orderlines.price * orderlines.quantity + orderlinesList.push([orderlines.product.display_name, orderlines.quantity, orderlines.price, totalprice]) + }) + return orderlinesList; + } + get total() { + /*Total is calculated and passed*/ + var total = 0 + var totalvalues = this.env.pos.selectedOrder.paymentlines + totalvalues.forEach(function (totalvalues) { + total = total + totalvalues.amount + }) + return 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..bbf891c57 --- /dev/null +++ b/simplified_pos/static/src/js/ProductScreen.js @@ -0,0 +1,87 @@ +odoo.define('point_of_sale.customer', function (require) { + const ProductScreen = require('point_of_sale.ProductScreen'); + const { useListener } = require("@web/core/utils/hooks"); + 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); + } + customerdetails() { + this.onClickPartner(); + } + 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.partner + 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.env.pos.removeOrder(this.currentOrder); + this.env.pos.add_new_order(); + 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) { + return true; + } + else { + return false; + } + } + get paymentLines() { + return this.env.pos.get_order().get_paymentlines(); + } + get_partner() { + return this.partner; + } + set_partner(partner) { + this.partner = this.env.pos.selectedPartner[4]; + } + get nextScreen() { + return { name: 'ProductScreen' }; + } + _selectLine(event) { + this.env.pos.selectedOrder.select_orderline(event.detail.orderline); + } + + } + Registries.Component.extend(ProductScreen, CustomerButtons); + return CustomerButtons; +}); \ 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..8520fbff4 --- /dev/null +++ b/simplified_pos/static/src/js/ProductScreenPaymentLine.js @@ -0,0 +1,35 @@ +odoo.define('point_of_sale.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.selectedOrder.paymentlines.find((line) => line.cid === cid); + this.env.pos.selectedOrder.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.selectedOrder.paymentlines.find((line) => line.cid === cid); + if (paymentline) { + this.env.pos.selectedOrder.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..df794334d --- /dev/null +++ b/simplified_pos/static/src/js/ProductWidgetSimple.js @@ -0,0 +1,24 @@ +odoo.define('point_of_sale.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(); + } + 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( + this.selectedCategoryId, + 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..35305e659 --- /dev/null +++ b/simplified_pos/static/src/scss/pos.scss @@ -0,0 +1,209 @@ +.pos .leftpane { + background: $gray-200; + float:left; + height: 98%; + display: flex; + flex-direction: column; + flex-grow: 1; + width:30%; + border: solid 5px teal;; + &::-webkit-scrollbar { + width: 0; + } +} +.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; +} +.pos .numpad { + display: grid; + grid-template-columns: repeat(4, 1fr); + text-align: center; + flex-grow: 1; + width: 100%; + min-width: 216px; +} +.pos .numpad button { + border-color:teal; + color:teal; + border-top: 1px solid; + border-bottom: 0px; +} +.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-300; + flex-grow: 1; + width: 50%; +} +.pos .right{ + float:right; + background:white; + width:30%; + height: 98.9%; + 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%; +} +.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; + padding: map-get($spacers, 1) map-get($spacers, 3); + background: $gray-300; + color: teal; + text-transform: uppercase; + font-weight: bold; + font-size: 15px; + order: 1; +} +.pos .payment-status-total-due { + font-size: 17px; + padding-top: 12px; + padding-bottom: 12px; + color: $gray-500; + 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: $primary; + color: #fff; + font-size: 14px; + font-weight: bold; + transition: all 150ms linear; +} +.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; +} +.pos .button.validation{ + background:#39B8B8 !important; + margin-bottom: 13px !important; +} +.highlight { + width: 29.45% !important; +} +.next { + border-bottom: solid 5px teal !important; +} +.paymentmethods-container { + overflow: scroll; + height: 49.125%; + &::-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: flex-start; + height: 100%; + min-height: 48px; +} \ 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..8ea013297 --- /dev/null +++ b/simplified_pos/static/src/xml/ActionpadWidget.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ 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..86dd7b94b --- /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/OrderWidget.xml b/simplified_pos/static/src/xml/OrderWidget.xml new file mode 100644 index 000000000..d2da2d4cb --- /dev/null +++ b/simplified_pos/static/src/xml/OrderWidget.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ 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..b7cd74107 --- /dev/null +++ b/simplified_pos/static/src/xml/PaymentScreenPaymentLine.xml @@ -0,0 +1,14 @@ + + + + + +
+ +
+
+
+
\ 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..c1bd5a850 --- /dev/null +++ b/simplified_pos/static/src/xml/PrintPopup.xml @@ -0,0 +1,89 @@ + + + + + + + \ 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..080c1b25b --- /dev/null +++ b/simplified_pos/static/src/xml/ProductScreen.xml @@ -0,0 +1,80 @@ + + + + + +
+ + +
+
+

CUSTOMER

+
+
+ +
+
+
+ +
+
+
+ +
+ New Order +
+
+
+
+ +
+
+
+

Payment method

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

Name:

+ +

Address:

+ +

Email:

+ +

Phone:

+ + +
+
+
\ 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..a9460219d --- /dev/null +++ b/simplified_pos/static/src/xml/ProductWidgetControlPanel.xml @@ -0,0 +1,28 @@ + + + + + +
+
+ + + + + + +
+
+
+
+
\ No newline at end of file diff --git a/simplified_pos/static/src/xml/chrome.xml b/simplified_pos/static/src/xml/chrome.xml new file mode 100644 index 000000000..dac78e634 --- /dev/null +++ b/simplified_pos/static/src/xml/chrome.xml @@ -0,0 +1,13 @@ + + + + + +
+ + +
+
+
+
\ No newline at end of file