diff --git a/multi_pos_category/README.rst b/multi_pos_category/README.rst new file mode 100644 index 000000000..7a44ed854 --- /dev/null +++ b/multi_pos_category/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: AGPL-3 + +Pos Multi Category +================== +* The point-of-sale system provides the capability for + select a single product from multiple product categories during purchasing. + + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE (AGPL-3) +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions: `__ + +Credits +------- +* Developer: (V16)Nisarudheen, Contact : odoo@cybrosys.com +Contacts +-------- +* Mail Contact : odoo@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 https://www.cybrosys.com + + +Further information +=================== +HTML Description: ``__ diff --git a/multi_pos_category/__init__.py b/multi_pos_category/__init__.py new file mode 100644 index 000000000..20be5e491 --- /dev/null +++ b/multi_pos_category/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU 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/multi_pos_category/__manifest__.py b/multi_pos_category/__manifest__.py new file mode 100644 index 000000000..1cb14f89a --- /dev/null +++ b/multi_pos_category/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU 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': 'Pos Multi Category', + 'version': '16.0.1.0.0', + 'category': 'Point of sale', + 'summary': 'Select multiple category in point of sale', + 'description': 'The point-of-sale system provides the ' + 'capability for select a single product from' + ' multiple product categories during purchasing.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'views/product_template_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'multi_pos_category/static/src/js/product_screen.js' + ] + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/multi_pos_category/doc/RELEASE_NOTE.md b/multi_pos_category/doc/RELEASE_NOTE.md new file mode 100644 index 000000000..d7fbc0c8f --- /dev/null +++ b/multi_pos_category/doc/RELEASE_NOTE.md @@ -0,0 +1,6 @@ +## Module + +#### 16.08.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Pos Multi Category \ No newline at end of file diff --git a/multi_pos_category/models/__init__.py b/multi_pos_category/models/__init__.py new file mode 100644 index 000000000..12d6c290b --- /dev/null +++ b/multi_pos_category/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU 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 product_template diff --git a/multi_pos_category/models/product_template.py b/multi_pos_category/models/product_template.py new file mode 100644 index 000000000..5a2c915ce --- /dev/null +++ b/multi_pos_category/models/product_template.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU 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 ProductTemplate(models.Model): + """This model was inherited for replace existing field pos_categ_id. """ + _inherit = 'product.template' + + pos_categ_id = fields.Many2many('pos.category', string="Pos Category", + help="Category used in the Point of Sale.") diff --git a/multi_pos_category/static/description/assets/icons/check.png b/multi_pos_category/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/check.png differ diff --git a/multi_pos_category/static/description/assets/icons/chevron.png b/multi_pos_category/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/chevron.png differ diff --git a/multi_pos_category/static/description/assets/icons/cogs.png b/multi_pos_category/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/cogs.png differ diff --git a/multi_pos_category/static/description/assets/icons/consultation.png b/multi_pos_category/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/consultation.png differ diff --git a/multi_pos_category/static/description/assets/icons/ecom-black.png b/multi_pos_category/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/ecom-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/education-black.png b/multi_pos_category/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/education-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/hotel-black.png b/multi_pos_category/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/hotel-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/license.png b/multi_pos_category/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/license.png differ diff --git a/multi_pos_category/static/description/assets/icons/lifebuoy.png b/multi_pos_category/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/lifebuoy.png differ diff --git a/multi_pos_category/static/description/assets/icons/logo.png b/multi_pos_category/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/logo.png differ diff --git a/multi_pos_category/static/description/assets/icons/manufacturing-black.png b/multi_pos_category/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/manufacturing-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/pos-black.png b/multi_pos_category/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/pos-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/puzzle.png b/multi_pos_category/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/puzzle.png differ diff --git a/multi_pos_category/static/description/assets/icons/restaurant-black.png b/multi_pos_category/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/restaurant-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/service-black.png b/multi_pos_category/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/service-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/trading-black.png b/multi_pos_category/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/trading-black.png differ diff --git a/multi_pos_category/static/description/assets/icons/training.png b/multi_pos_category/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/training.png differ diff --git a/multi_pos_category/static/description/assets/icons/update.png b/multi_pos_category/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/update.png differ diff --git a/multi_pos_category/static/description/assets/icons/user.png b/multi_pos_category/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/user.png differ diff --git a/multi_pos_category/static/description/assets/icons/wrench.png b/multi_pos_category/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/multi_pos_category/static/description/assets/icons/wrench.png differ diff --git a/multi_pos_category/static/description/assets/modules/banner1.png b/multi_pos_category/static/description/assets/modules/banner1.png new file mode 100644 index 000000000..af96cc10a Binary files /dev/null and b/multi_pos_category/static/description/assets/modules/banner1.png differ diff --git a/multi_pos_category/static/description/assets/modules/banner2.png b/multi_pos_category/static/description/assets/modules/banner2.png new file mode 100644 index 000000000..489f44e86 Binary files /dev/null and b/multi_pos_category/static/description/assets/modules/banner2.png differ diff --git a/multi_pos_category/static/description/assets/modules/banner3.png b/multi_pos_category/static/description/assets/modules/banner3.png new file mode 100644 index 000000000..2c8fbb83f Binary files /dev/null and b/multi_pos_category/static/description/assets/modules/banner3.png differ diff --git a/multi_pos_category/static/description/assets/modules/banner4.png b/multi_pos_category/static/description/assets/modules/banner4.png new file mode 100644 index 000000000..a29119785 Binary files /dev/null and b/multi_pos_category/static/description/assets/modules/banner4.png differ diff --git a/multi_pos_category/static/description/assets/modules/banner5.png b/multi_pos_category/static/description/assets/modules/banner5.png new file mode 100644 index 000000000..6d637752d Binary files /dev/null and b/multi_pos_category/static/description/assets/modules/banner5.png differ diff --git a/multi_pos_category/static/description/assets/screenshots/hero.gif b/multi_pos_category/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..3c8aa6722 Binary files /dev/null and b/multi_pos_category/static/description/assets/screenshots/hero.gif differ diff --git a/multi_pos_category/static/description/assets/screenshots/pos_categ1.png b/multi_pos_category/static/description/assets/screenshots/pos_categ1.png new file mode 100644 index 000000000..d957e47b9 Binary files /dev/null and b/multi_pos_category/static/description/assets/screenshots/pos_categ1.png differ diff --git a/multi_pos_category/static/description/assets/screenshots/pos_categ2.png b/multi_pos_category/static/description/assets/screenshots/pos_categ2.png new file mode 100644 index 000000000..bd010dc70 Binary files /dev/null and b/multi_pos_category/static/description/assets/screenshots/pos_categ2.png differ diff --git a/multi_pos_category/static/description/assets/screenshots/pos_categ3.png b/multi_pos_category/static/description/assets/screenshots/pos_categ3.png new file mode 100644 index 000000000..a50d72f8d Binary files /dev/null and b/multi_pos_category/static/description/assets/screenshots/pos_categ3.png differ diff --git a/multi_pos_category/static/description/assets/screenshots/pos_categ4.png b/multi_pos_category/static/description/assets/screenshots/pos_categ4.png new file mode 100644 index 000000000..832630858 Binary files /dev/null and b/multi_pos_category/static/description/assets/screenshots/pos_categ4.png differ diff --git a/multi_pos_category/static/description/assets/screenshots/pos_categ5.png b/multi_pos_category/static/description/assets/screenshots/pos_categ5.png new file mode 100644 index 000000000..af00757e6 Binary files /dev/null and b/multi_pos_category/static/description/assets/screenshots/pos_categ5.png differ diff --git a/multi_pos_category/static/description/banner.png b/multi_pos_category/static/description/banner.png new file mode 100644 index 000000000..a6497d4ca Binary files /dev/null and b/multi_pos_category/static/description/banner.png differ diff --git a/multi_pos_category/static/description/icon.png b/multi_pos_category/static/description/icon.png new file mode 100644 index 000000000..1ed7f36b8 Binary files /dev/null and b/multi_pos_category/static/description/icon.png differ diff --git a/multi_pos_category/static/description/index.html b/multi_pos_category/static/description/index.html new file mode 100644 index 000000000..d237ed130 --- /dev/null +++ b/multi_pos_category/static/description/index.html @@ -0,0 +1,625 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+ +
+
+
+

+ Pos Multi Category

+

+ The point of sale (POS) system provides the capability for users to select multiple + product categories during transactions, + streamlining the purchasing process and enhancing efficiency. +

+ +
+
+ + +
+
+

+ Overview +

+
+
+

+ This module will used to Select multiple categories at the point + of sale for a product. +

+
+
+
+

+ Features +

+
+
+
+ +
+
+

+ We can set multiple categories for a product.

+

+ Under the "Sale" tab in the product form, the user has the + capability to assign multiple point-of-sale categories to + a single product.

+
+
+
+
+ +
+
+

+ We can Select product with different categories in Pos-session

+

+ Customers will be able to select a single product from the + allocated categories during a point-of-sale session.

+
+
+
+
+
+

+ Screenshots +

+
+
+

+ Point of sale category creation.

+

+ User can create point of sale categories by clicking POS Product + Category. +

+ +
+
+

+ Set multiple categories for a single product.

+

+ User can allocate multiple categories while clicking sales + tab.

+ +
+ +
+

+ Product available in multi categorys

+

+ The user can filter that product into multiple categories.

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

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

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
diff --git a/multi_pos_category/static/src/js/product_screen.js b/multi_pos_category/static/src/js/product_screen.js new file mode 100644 index 000000000..be5e420c6 --- /dev/null +++ b/multi_pos_category/static/src/js/product_screen.js @@ -0,0 +1,74 @@ +odoo.define('multi_pos_category.product_product', function (require) { + 'use strict'; + const DB = require('point_of_sale.DB'); + var utils = require('web.utils'); + DB.include({ + init: function (options) { + this._super.apply(this, arguments); + this.get_product_by_category(); + this.search_product_in_category(); + }, + get_product_by_category: function (category_id) { + /* This function will be used to Retrieves the product by user selecting category wise*/ + var list = []; + if (category_id!=0){ + var products = this.product_by_category_id[0]; + // Iterate through each product + for(const key in products){ + var list_product = []; + // Retrieve the list of pos_categ_id values for the current product + for(const keys in this.product_by_id[products[key]].pos_categ_id){ + list_product.push(this.product_by_id[products[key]].pos_categ_id[keys]) + } + // Check if the category_id is present in the list of pos_categ_id values + if(jQuery.inArray(category_id, list_product) !== -1){ + list.push(this.product_by_id[products[key]]); + } + } + } + else{ + // Retrieve the product_ids associated with the "0" category + var product_ids = this.product_by_category_id["undefined"]; + if (product_ids) { + for (var i = 0, len = Math.min(product_ids.length, this.limit); i < len; i++) { + const product = this.product_by_id[product_ids[i]]; + if (!(product.active && product.available_in_pos)) continue; + list.push(product); + } + } + } + return list; + }, + search_product_in_category: function (category_id, query) { +/* Searches for products within a specific category based on the provided query.*/ + if (category_id == 0) { + var categ = "undefined"; + } else { + var categ = category_id; + } + try { + // Prepare the search query by replacing special characters and spaces + query = query.replace(/[\[\]\(\)\+\*\?\.\-\!\&\^\$\|\~\_\{\}\:\,\\\/]/g,'.'); + query = query.replace(/ /g,'.+'); + // Create a regular expression with the search query and unaccented characters + var re = RegExp("([0-9]+):.*?"+utils.unaccent(query),"gi"); + }catch(_e){ + return []; + } + var results = []; + for(var i = 0; i < this.limit; i++){ + var r = re.exec(this.category_search_string[categ]); + if(r){ + var id = Number(r[1]); + const product = this.get_product_by_id(id); + if (!(product.active && product.available_in_pos)) continue; + results.push(product); + }else{ + break; + } + } + return results; + }, + }); + return DB; +}); diff --git a/multi_pos_category/views/product_template_views.xml b/multi_pos_category/views/product_template_views.xml new file mode 100644 index 000000000..de95e8715 --- /dev/null +++ b/multi_pos_category/views/product_template_views.xml @@ -0,0 +1,15 @@ + + + + + product.template.view.form.inherit.multi.pos.category + + product.template + + + + + + + +