diff --git a/total_quantity_pos/README.rst b/total_quantity_pos/README.rst new file mode 100644 index 000000000..a7796a298 --- /dev/null +++ b/total_quantity_pos/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Total Items and Total Quantity in POS +===================================== +This module allows to show the total items and total quantities of products along with the total amount in pos screen and in the bill also. + +Configuration +============= +* To show the total items and quantities in the POS Screen, the user need to activate the ' Enable Total Items ' under Pos interface section. +* To show the total items and quantities in the bill, the user need to activate the ' Enable Total Items ' under Bills & Receipts section. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE v3.0 (AGPL-3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (V14) Ammu Raj, 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/total_quantity_pos/__init__.py b/total_quantity_pos/__init__.py new file mode 100644 index 000000000..d9e93b8e8 --- /dev/null +++ b/total_quantity_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 . +# +################################################################################ +from . import models diff --git a/total_quantity_pos/__manifest__.py b/total_quantity_pos/__manifest__.py new file mode 100644 index 000000000..c264343b9 --- /dev/null +++ b/total_quantity_pos/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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': 'Total Items and Total Quantity in POS', + 'version': '14.0.1.0.0', + 'category': 'Point of Sale', + 'summary': "To Show the Total Quantity and Total Items Ordered in POS", + 'description': "This app will shows the number of " + "products ordered and the total quantity" + " of products in the order summary in" + " the pos screen and bill.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['point_of_sale'], + 'data': [ + 'views/pos_config_views.xml', + 'views/assets.xml', + ], + 'qweb': [ + 'static/src/xml/TotalQuantitySummary.xml', + 'static/src/xml/TotalQuantityReceipt.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/total_quantity_pos/doc/RELEASE_NOTES.md b/total_quantity_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..a1317beb6 --- /dev/null +++ b/total_quantity_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 13.10.2023 +#### Version 14.0.1.0.0 +#### ADD +- Initial Commit for Total Items and Total Quantity in POS diff --git a/total_quantity_pos/models/__init__.py b/total_quantity_pos/models/__init__.py new file mode 100644 index 000000000..1c8c9077e --- /dev/null +++ b/total_quantity_pos/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 . +# +################################################################################ +from . import pos_config diff --git a/total_quantity_pos/models/pos_config.py b/total_quantity_pos/models/pos_config.py new file mode 100644 index 000000000..989ce3ca2 --- /dev/null +++ b/total_quantity_pos/models/pos_config.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 . +# +################################################################################ +from odoo import fields, models + + +class PosConfig(models.Model): + """ Class for adding the fields in the pos config""" + _inherit = "pos.config" + + pos_total_screen = fields.Boolean(string="Total Items and Quantity", + help="Enable this option will show the" + "total number of items and total" + "quantities of product in the PoS" + "screen.") + pos_total_receipt = fields.Boolean(string="Total Items and Quantity", + help="Enable this option will show the" + "total number of items and total" + "quantities of product in the" + "receipt.") diff --git a/total_quantity_pos/static/description/assets/icons/check.png b/total_quantity_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/check.png differ diff --git a/total_quantity_pos/static/description/assets/icons/chevron.png b/total_quantity_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/chevron.png differ diff --git a/total_quantity_pos/static/description/assets/icons/cogs.png b/total_quantity_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/cogs.png differ diff --git a/total_quantity_pos/static/description/assets/icons/consultation.png b/total_quantity_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/consultation.png differ diff --git a/total_quantity_pos/static/description/assets/icons/ecom-black.png b/total_quantity_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/ecom-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/education-black.png b/total_quantity_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/education-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/hotel-black.png b/total_quantity_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/hotel-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/license.png b/total_quantity_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/license.png differ diff --git a/total_quantity_pos/static/description/assets/icons/lifebuoy.png b/total_quantity_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/total_quantity_pos/static/description/assets/icons/manufacturing-black.png b/total_quantity_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/pos-black.png b/total_quantity_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/pos-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/puzzle.png b/total_quantity_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/puzzle.png differ diff --git a/total_quantity_pos/static/description/assets/icons/restaurant-black.png b/total_quantity_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/service-black.png b/total_quantity_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/service-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/trading-black.png b/total_quantity_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/trading-black.png differ diff --git a/total_quantity_pos/static/description/assets/icons/training.png b/total_quantity_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/training.png differ diff --git a/total_quantity_pos/static/description/assets/icons/update.png b/total_quantity_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/update.png differ diff --git a/total_quantity_pos/static/description/assets/icons/user.png b/total_quantity_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/user.png differ diff --git a/total_quantity_pos/static/description/assets/icons/wrench.png b/total_quantity_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/total_quantity_pos/static/description/assets/icons/wrench.png differ diff --git a/total_quantity_pos/static/description/assets/misc/categories.png b/total_quantity_pos/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/categories.png differ diff --git a/total_quantity_pos/static/description/assets/misc/check-box.png b/total_quantity_pos/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/check-box.png differ diff --git a/total_quantity_pos/static/description/assets/misc/compass.png b/total_quantity_pos/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/compass.png differ diff --git a/total_quantity_pos/static/description/assets/misc/corporate.png b/total_quantity_pos/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/corporate.png differ diff --git a/total_quantity_pos/static/description/assets/misc/customer-support.png b/total_quantity_pos/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/customer-support.png differ diff --git a/total_quantity_pos/static/description/assets/misc/cybrosys-logo.png b/total_quantity_pos/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/cybrosys-logo.png differ diff --git a/total_quantity_pos/static/description/assets/misc/features.png b/total_quantity_pos/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/features.png differ diff --git a/total_quantity_pos/static/description/assets/misc/logo.png b/total_quantity_pos/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/logo.png differ diff --git a/total_quantity_pos/static/description/assets/misc/pictures.png b/total_quantity_pos/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/pictures.png differ diff --git a/total_quantity_pos/static/description/assets/misc/pie-chart.png b/total_quantity_pos/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/pie-chart.png differ diff --git a/total_quantity_pos/static/description/assets/misc/right-arrow.png b/total_quantity_pos/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/right-arrow.png differ diff --git a/total_quantity_pos/static/description/assets/misc/star.png b/total_quantity_pos/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/star.png differ diff --git a/total_quantity_pos/static/description/assets/misc/support.png b/total_quantity_pos/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/support.png differ diff --git a/total_quantity_pos/static/description/assets/misc/whatsapp.png b/total_quantity_pos/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/total_quantity_pos/static/description/assets/misc/whatsapp.png differ diff --git a/total_quantity_pos/static/description/assets/modules/1.png b/total_quantity_pos/static/description/assets/modules/1.png new file mode 100644 index 000000000..6f28da108 Binary files /dev/null and b/total_quantity_pos/static/description/assets/modules/1.png differ diff --git a/total_quantity_pos/static/description/assets/modules/2.png b/total_quantity_pos/static/description/assets/modules/2.png new file mode 100644 index 000000000..6f28da108 Binary files /dev/null and b/total_quantity_pos/static/description/assets/modules/2.png differ diff --git a/total_quantity_pos/static/description/assets/modules/3.png b/total_quantity_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..bf3ea33eb Binary files /dev/null and b/total_quantity_pos/static/description/assets/modules/3.png differ diff --git a/total_quantity_pos/static/description/assets/modules/4.png b/total_quantity_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..2aa92f3a9 Binary files /dev/null and b/total_quantity_pos/static/description/assets/modules/4.png differ diff --git a/total_quantity_pos/static/description/assets/modules/5.png b/total_quantity_pos/static/description/assets/modules/5.png new file mode 100644 index 000000000..8f4a468ac Binary files /dev/null and b/total_quantity_pos/static/description/assets/modules/5.png differ diff --git a/total_quantity_pos/static/description/assets/modules/6.png b/total_quantity_pos/static/description/assets/modules/6.png new file mode 100644 index 000000000..a7e36775f Binary files /dev/null and b/total_quantity_pos/static/description/assets/modules/6.png differ diff --git a/total_quantity_pos/static/description/assets/screenshots/hero.gif b/total_quantity_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..c2c960e1b Binary files /dev/null and b/total_quantity_pos/static/description/assets/screenshots/hero.gif differ diff --git a/total_quantity_pos/static/description/assets/screenshots/screenshot_5.png b/total_quantity_pos/static/description/assets/screenshots/screenshot_5.png new file mode 100644 index 000000000..b5bf496f6 Binary files /dev/null and b/total_quantity_pos/static/description/assets/screenshots/screenshot_5.png differ diff --git a/total_quantity_pos/static/description/assets/screenshots/screenshot_6.png b/total_quantity_pos/static/description/assets/screenshots/screenshot_6.png new file mode 100644 index 000000000..695144417 Binary files /dev/null and b/total_quantity_pos/static/description/assets/screenshots/screenshot_6.png differ diff --git a/total_quantity_pos/static/description/assets/screenshots/screenshot_7.png b/total_quantity_pos/static/description/assets/screenshots/screenshot_7.png new file mode 100644 index 000000000..ffd974201 Binary files /dev/null and b/total_quantity_pos/static/description/assets/screenshots/screenshot_7.png differ diff --git a/total_quantity_pos/static/description/assets/screenshots/screenshot_8.png b/total_quantity_pos/static/description/assets/screenshots/screenshot_8.png new file mode 100644 index 000000000..9f5ec0a1d Binary files /dev/null and b/total_quantity_pos/static/description/assets/screenshots/screenshot_8.png differ diff --git a/total_quantity_pos/static/description/banner.png b/total_quantity_pos/static/description/banner.png new file mode 100644 index 000000000..d34f95f60 Binary files /dev/null and b/total_quantity_pos/static/description/banner.png differ diff --git a/total_quantity_pos/static/description/icon.png b/total_quantity_pos/static/description/icon.png new file mode 100644 index 000000000..0cc08eb45 Binary files /dev/null and b/total_quantity_pos/static/description/icon.png differ diff --git a/total_quantity_pos/static/description/index.html b/total_quantity_pos/static/description/index.html new file mode 100644 index 000000000..d6c8a72ae --- /dev/null +++ b/total_quantity_pos/static/description/index.html @@ -0,0 +1,647 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Total Items and Total Quantity in POS

+

+ Shows Total Quantity and Items of Ordered Products In PoS

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps user to see the total items and quantities of products in PoS screen and bill also. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Show the total items and quantities of products in PoS Screen. +
+
+ + Show the total items and quantities of products in bill. +
+
+
+
+ + Available in Odoo 14.0 + Community and Enterprise. +
+
+ + + Option for disable the feature from settings. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Option to make the feature available in PoS screen. +

+ +
+ +
+

+ Option to make the feature available in Bill. +

+ +
+ +
+

+ Total Items and Total Quantities will display in the POS screen. +

+ +
+ +
+

+ Total items and Quantities will display in the Bill. +

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

+ 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/total_quantity_pos/static/src/js/QuantityOrderSummary.js b/total_quantity_pos/static/src/js/QuantityOrderSummary.js new file mode 100644 index 000000000..c5fc7ee62 --- /dev/null +++ b/total_quantity_pos/static/src/js/QuantityOrderSummary.js @@ -0,0 +1,28 @@ +odoo.define('total_quantity_pos.QuantityChange', function(require) { + 'use strict'; + + const OrderSummary = require('point_of_sale.OrderSummary'); + const Registries = require('point_of_sale.Registries'); + + const QuantityChange = OrderSummary => + class extends OrderSummary { + //For getting the total items in the product screen + get total_items() { + var total_items = this.env.pos.get_order().orderlines.length; + return total_items; + } + //For getting the total count of products in the product screen + get quant_count() { + var total_items = this.env.pos.get_order().orderlines.length; + let quant_count = 0; + let i = 0; + for (; i < total_items;) { + quant_count += this.env.pos.get_order().orderlines.models[i].quantity; + i++; + } + return quant_count; + } + }; + Registries.Component.extend(OrderSummary, QuantityChange); + return QuantityChange; +}); diff --git a/total_quantity_pos/static/src/js/TotalQuantityReceipt.js b/total_quantity_pos/static/src/js/TotalQuantityReceipt.js new file mode 100644 index 000000000..c29ae2159 --- /dev/null +++ b/total_quantity_pos/static/src/js/TotalQuantityReceipt.js @@ -0,0 +1,28 @@ +odoo.define('total_quantity_pos.OrderReceiptQty', function(require) { + 'use strict'; + + const OrderReceipt = require('point_of_sale.OrderReceipt') + const Registries = require('point_of_sale.Registries'); + + const OrderReceiptQty = OrderReceipt => + class extends OrderReceipt { + //For getting the total items in the receipt + get total_items() { + var total_items = this.env.pos.get_order().orderlines.length; + return total_items; + } + //For getting the total count of products in the receipt + get quant_count() { + var total_items = this.env.pos.get_order().orderlines.length; + let quant_count = 0; + let i = 0; + for (; i < total_items;) { + quant_count += this.env.pos.get_order().orderlines.models[i].quantity; + i++; + } + return quant_count; + } + } + Registries.Component.extend(OrderReceipt, OrderReceiptQty) + return OrderReceiptQty +}); diff --git a/total_quantity_pos/static/src/xml/TotalQuantityReceipt.xml b/total_quantity_pos/static/src/xml/TotalQuantityReceipt.xml new file mode 100644 index 000000000..3d8cffa2d --- /dev/null +++ b/total_quantity_pos/static/src/xml/TotalQuantityReceipt.xml @@ -0,0 +1,24 @@ + + + + + + +
+
+
Total Items : + +
+
+
Total Quantities : + +
+
+
+
+
+
+
diff --git a/total_quantity_pos/static/src/xml/TotalQuantitySummary.xml b/total_quantity_pos/static/src/xml/TotalQuantitySummary.xml new file mode 100644 index 000000000..ae0f2e08b --- /dev/null +++ b/total_quantity_pos/static/src/xml/TotalQuantitySummary.xml @@ -0,0 +1,22 @@ + + + + + + +
+
+ Total Items : + +
+ Total Quantity : +
+
+
+
+
+
+
+
diff --git a/total_quantity_pos/views/assets.xml b/total_quantity_pos/views/assets.xml new file mode 100644 index 000000000..aa808ba3f --- /dev/null +++ b/total_quantity_pos/views/assets.xml @@ -0,0 +1,12 @@ + + + +