diff --git a/multi_barcodes_pos/README.rst b/multi_barcodes_pos/README.rst new file mode 100755 index 000000000..6e0b0d342 --- /dev/null +++ b/multi_barcodes_pos/README.rst @@ -0,0 +1,51 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Product Multi Barcode +========================= +Allows to create multiple barcode for a single product. + +Configuration +============ +- www.odoo.com/documentation/17.0/setup/install.html +- Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (V17) SRUTHI PAVITHRAN, + (V16) Viswanth K, + (V15) Viswanth K, + (V14) Viswanth K, + (V13) Risha C.T, + Contact: odoo@cybrosys.com + +Contacts +-------- +* 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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/multi_barcodes_pos/__init__.py b/multi_barcodes_pos/__init__.py new file mode 100755 index 000000000..385a3ef07 --- /dev/null +++ b/multi_barcodes_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sruthi Pavithran (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/multi_barcodes_pos/__manifest__.py b/multi_barcodes_pos/__manifest__.py new file mode 100755 index 000000000..5eaf59842 --- /dev/null +++ b/multi_barcodes_pos/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sruthi Pavithran (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': 'POS Product Multi Barcode', + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """Allows to create multiple barcode for a single product""", + 'description': """This module allows you to set multiple barcodes for a + product and product varients""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com/', + 'depends': ['product', 'point_of_sale', 'web'], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_template_views.xml', + 'views/product_product_views.xml' + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'multi_barcodes_pos/static/src/js/PosStore.js', + 'multi_barcodes_pos/static/src/js/pos_scan.js', + 'multi_barcodes_pos/static/src/js/ProductWidget.js' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/multi_barcodes_pos/doc/RELEASE_NOTES.md b/multi_barcodes_pos/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..948573275 --- /dev/null +++ b/multi_barcodes_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.02.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial commit for POS Product Multi Barcode diff --git a/multi_barcodes_pos/models/__init__.py b/multi_barcodes_pos/models/__init__.py new file mode 100755 index 000000000..48044574d --- /dev/null +++ b/multi_barcodes_pos/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sruthi Pavithran (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 multi_barcode_products +from . import product_product +from . import pos_session +from . import product_template diff --git a/multi_barcodes_pos/models/multi_barcode_products.py b/multi_barcodes_pos/models/multi_barcode_products.py new file mode 100755 index 000000000..1fff453b7 --- /dev/null +++ b/multi_barcodes_pos/models/multi_barcode_products.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sruthi Pavithran (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 MultiBarcodeProducts(models.Model): + """ + Model for storing multiple barcode details + """ + _name = 'multi.barcode.products' + _description = 'For creating multiple Barcodes for products' + + multi_barcode = fields.Char(string="Barcode", + help="Provide alternate barcodes for this " + "product") + product_multi_id = fields.Many2one('product.product', + string="Product", + help="Multi Barcode Product") + template_multi_id = fields.Many2one('product.template', + string="Product", + help="Product with Multi Barcode") + + _sql_constraints = [('field_unique', 'unique(multi_barcode)', + 'Existing barcode is not allowed !'),] + + def get_barcode_val(self, product): + """returns barcode of record in self and product id""" + return self.multi_barcode, product diff --git a/multi_barcodes_pos/models/pos_session.py b/multi_barcodes_pos/models/pos_session.py new file mode 100755 index 000000000..83772ba3c --- /dev/null +++ b/multi_barcodes_pos/models/pos_session.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sruthi Pavithran (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 models + + +class PosSession(models.Model): + """ + Inherit pos session for adding multi barcode products in to session + """ + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """ + Retrieve a list of Point of Sale (POS) UI models to load, + including the 'multi.barcode.products' model if not already + present. + """ + result = super()._pos_ui_models_to_load() + new_model = 'multi.barcode.products' + if new_model not in result: + result.append(new_model) + return result + + def _loader_params_multi_barcode_products(self): + """ + Define loader parameters for the 'multi.barcode.products' model. + """ + record = { + 'search_params': { + 'fields': ['product_multi_id', 'multi_barcode'] + } + } + return record + + def _loader_params_product_product(self): + """ + Retrieve loader parameters for the 'product.product' model with + an additional field. + """ + result = super()._loader_params_product_product() + result['search_params']['fields'].append('product_multi_barcodes_ids') + return result + + def _get_pos_ui_multi_barcode_products(self, params): + """ + Retrieve multi-barcode product records from the database based + on the specified search parameters + """ + record = self.env['multi.barcode.products'].search_read( + **params['search_params']) + return record + + def _pos_data_process(self, loaded_data): + """ + This method is responsible for processing loaded data for + Point of Sale (POS) + """ + super()._pos_data_process(loaded_data) + context = {} + for rec in loaded_data['multi.barcode.products']: + if rec['product_multi_id']: + context[rec['multi_barcode']] = rec['product_multi_id'][0] + loaded_data['multi_barcode'] = context diff --git a/multi_barcodes_pos/models/product_product.py b/multi_barcodes_pos/models/product_product.py new file mode 100755 index 000000000..f0b9ef536 --- /dev/null +++ b/multi_barcodes_pos/models/product_product.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sruthi Pavithran (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 api, fields, models + + +class ProductProduct(models.Model): + """ + Inherit product.product model for adding fields + """ + _inherit = 'product.product' + + product_multi_barcodes_ids = fields.One2many( + 'multi.barcode.products','product_multi_id', + help="Multiple Barcodes for the product", string='Barcodes') + + @api.model + def create(self, vals): + """ + Create a new product record with the provided values and update + the associated multi-barcode product template. + """ + res = super(ProductProduct, self).create(vals) + res.product_multi_barcodes_ids.update({ + 'template_multi_id': res.product_tmpl_id.id + }) + return res + + def write(self, vals): + """ + Update the product record with the provided values and update + the associated multi-barcode product template. + """ + res = super(ProductProduct, self).write(vals) + self.product_multi_barcodes_ids.update({ + 'template_multi_id': self.product_tmpl_id.id + }) + return res diff --git a/multi_barcodes_pos/models/product_template.py b/multi_barcodes_pos/models/product_template.py new file mode 100755 index 000000000..c091263bc --- /dev/null +++ b/multi_barcodes_pos/models/product_template.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sruthi Pavithran (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 api, fields, models + + +class ProductTemplate(models.Model): + """ + Inherit product.template model for adding fields + """ + _inherit = 'product.template' + + template_multi_barcodes_ids = fields.One2many( + 'multi.barcode.products','template_multi_id', + string='Barcodes', help="Multiple Barcodes for the product") + + @api.model + def create(self, vals): + """ + Create a new product template record with the provided values + and update the associated multi-barcode product. + """ + res = super(ProductTemplate, self).create(vals) + res.template_multi_barcodes_ids.update({ + 'product_multi_id': res.product_variant_id.id + }) + return res + + def write(self, vals): + """ + Update the product template record with the provided values and + update the associated multi-barcode product. + """ + res = super(ProductTemplate, self).write(vals) + if self.template_multi_barcodes_ids: + self.template_multi_barcodes_ids.update({ + 'product_multi_id': self.product_variant_id.id + }) + return res diff --git a/multi_barcodes_pos/security/ir.model.access.csv b/multi_barcodes_pos/security/ir.model.access.csv new file mode 100755 index 000000000..588def3fd --- /dev/null +++ b/multi_barcodes_pos/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +multi_barcode_products_id,multi.barcode.products.user,model_multi_barcode_products,,1,1,1,1 diff --git a/multi_barcodes_pos/static/description/assets/icons/check.png b/multi_barcodes_pos/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/check.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/chevron.png b/multi_barcodes_pos/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/chevron.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/cogs.png b/multi_barcodes_pos/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/cogs.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/consultation.png b/multi_barcodes_pos/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/consultation.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/ecom-black.png b/multi_barcodes_pos/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/ecom-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/education-black.png b/multi_barcodes_pos/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/education-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/hotel-black.png b/multi_barcodes_pos/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/hotel-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/license.png b/multi_barcodes_pos/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/license.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/lifebuoy.png b/multi_barcodes_pos/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/logo.png b/multi_barcodes_pos/static/description/assets/icons/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/logo.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/manufacturing-black.png b/multi_barcodes_pos/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/pos-black.png b/multi_barcodes_pos/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/pos-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/puzzle.png b/multi_barcodes_pos/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/puzzle.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/restaurant-black.png b/multi_barcodes_pos/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/service-black.png b/multi_barcodes_pos/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/service-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/trading-black.png b/multi_barcodes_pos/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/trading-black.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/training.png b/multi_barcodes_pos/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/training.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/update.png b/multi_barcodes_pos/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/update.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/user.png b/multi_barcodes_pos/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/user.png differ diff --git a/multi_barcodes_pos/static/description/assets/icons/wrench.png b/multi_barcodes_pos/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/icons/wrench.png differ diff --git a/multi_barcodes_pos/static/description/assets/misc/Cybrosys R.png b/multi_barcodes_pos/static/description/assets/misc/Cybrosys R.png new file mode 100755 index 000000000..da4058087 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/misc/Cybrosys R.png differ diff --git a/multi_barcodes_pos/static/description/assets/misc/email.svg b/multi_barcodes_pos/static/description/assets/misc/email.svg new file mode 100755 index 000000000..15291cdc3 --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/multi_barcodes_pos/static/description/assets/misc/phone.svg b/multi_barcodes_pos/static/description/assets/misc/phone.svg new file mode 100755 index 000000000..b7bd7f251 --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/multi_barcodes_pos/static/description/assets/misc/star (1) 2.svg b/multi_barcodes_pos/static/description/assets/misc/star (1) 2.svg new file mode 100755 index 000000000..5ae9f507a --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/multi_barcodes_pos/static/description/assets/misc/support (1) 1.svg b/multi_barcodes_pos/static/description/assets/misc/support (1) 1.svg new file mode 100755 index 000000000..7d37a8f30 --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/multi_barcodes_pos/static/description/assets/misc/support-email.svg b/multi_barcodes_pos/static/description/assets/misc/support-email.svg new file mode 100755 index 000000000..eb70370d6 --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/multi_barcodes_pos/static/description/assets/misc/tick-mark.svg b/multi_barcodes_pos/static/description/assets/misc/tick-mark.svg new file mode 100755 index 000000000..2dbb40187 --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/multi_barcodes_pos/static/description/assets/misc/whatsapp 1.svg b/multi_barcodes_pos/static/description/assets/misc/whatsapp 1.svg new file mode 100755 index 000000000..0bfaf8fc6 --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/multi_barcodes_pos/static/description/assets/misc/whatsapp.svg b/multi_barcodes_pos/static/description/assets/misc/whatsapp.svg new file mode 100755 index 000000000..b618aea1d --- /dev/null +++ b/multi_barcodes_pos/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/multi_barcodes_pos/static/description/assets/modules/1.png b/multi_barcodes_pos/static/description/assets/modules/1.png new file mode 100755 index 000000000..5ecc4d883 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/modules/1.png differ diff --git a/multi_barcodes_pos/static/description/assets/modules/2.png b/multi_barcodes_pos/static/description/assets/modules/2.png new file mode 100755 index 000000000..05ed3ee8c Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/modules/2.png differ diff --git a/multi_barcodes_pos/static/description/assets/modules/3.png b/multi_barcodes_pos/static/description/assets/modules/3.png new file mode 100755 index 000000000..5514bb8d4 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/modules/3.png differ diff --git a/multi_barcodes_pos/static/description/assets/modules/4.png b/multi_barcodes_pos/static/description/assets/modules/4.png new file mode 100755 index 000000000..38ea1f663 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/modules/4.png differ diff --git a/multi_barcodes_pos/static/description/assets/modules/5.png b/multi_barcodes_pos/static/description/assets/modules/5.png new file mode 100755 index 000000000..dcbd0cb06 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/modules/5.png differ diff --git a/multi_barcodes_pos/static/description/assets/modules/6.png b/multi_barcodes_pos/static/description/assets/modules/6.png new file mode 100755 index 000000000..05ed3ee8c Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/modules/6.png differ diff --git a/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(121).png b/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(121).png new file mode 100755 index 000000000..fbd56161f Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(121).png differ diff --git a/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(122).png b/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(122).png new file mode 100755 index 000000000..568aed8dc Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(122).png differ diff --git a/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(123).png b/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(123).png new file mode 100755 index 000000000..76cb078c1 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/screenshots/Screenshot(123).png differ diff --git a/multi_barcodes_pos/static/description/assets/screenshots/hero.gif b/multi_barcodes_pos/static/description/assets/screenshots/hero.gif new file mode 100755 index 000000000..309c706a5 Binary files /dev/null and b/multi_barcodes_pos/static/description/assets/screenshots/hero.gif differ diff --git a/multi_barcodes_pos/static/description/banner.jpg b/multi_barcodes_pos/static/description/banner.jpg new file mode 100755 index 000000000..f8373c6da Binary files /dev/null and b/multi_barcodes_pos/static/description/banner.jpg differ diff --git a/multi_barcodes_pos/static/description/icon.png b/multi_barcodes_pos/static/description/icon.png new file mode 100755 index 000000000..7451c03fc Binary files /dev/null and b/multi_barcodes_pos/static/description/icon.png differ diff --git a/multi_barcodes_pos/static/description/index.html b/multi_barcodes_pos/static/description/index.html new file mode 100755 index 000000000..aaf1e44d3 --- /dev/null +++ b/multi_barcodes_pos/static/description/index.html @@ -0,0 +1,668 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ POS Product Multi Barcode

+

+ Allow to scan multiple barcodes of a product in POS +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Multiple Barcodes for a Product

+

+ This module allows you to set multiple barcodes for a product and product variants. +

+
+
+
+
+
+
+ +
+
+

+ Scanning Product in Pos

+

Install the + Use these barcodes for scanning the product in pos. +

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

+ For setting multiple barcodes for products, go to Point of sale –> Products –> Product Variants and select Barcodes Tab.

+
+
+
+
+
+
+ +
+
+

+ Now set multiple barcodes and go to Dashboard and open a pos to scan barcode using barcode scanner.

+
+
+
+
+
+
+ +
+
+

+ Scan the barcode using the barcode scanner and you can see the product gets added in ordeline. + If there is only single product Variant, you can see the multiple barcodes set for product in + Point of sale -- > Products --> Products.

+
+
+
+
+
+
+
    +
  • + Set multiple barcodes for a single product + greetings. +
  • +
  • + Scan using these barcodes in pos. +
  • +
  • + Allows using default barcode option also. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:08th Feb 2024 +
+

+ Initial Commit for POS Product Multi Barcode.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/multi_barcodes_pos/static/src/js/PosStore.js b/multi_barcodes_pos/static/src/js/PosStore.js new file mode 100755 index 000000000..2d3c72e1b --- /dev/null +++ b/multi_barcodes_pos/static/src/js/PosStore.js @@ -0,0 +1,13 @@ +/** @odoo-module */ + +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { patch } from "@web/core/utils/patch"; + +patch(PosStore.prototype, { + async _processData(loadedData) { + //@override + await super._processData(...arguments); + this.product_by_lot = loadedData['multi.barcode.products']; + this.product_by_lot_id = loadedData['multi_barcode']; + } +}); diff --git a/multi_barcodes_pos/static/src/js/ProductWidget.js b/multi_barcodes_pos/static/src/js/ProductWidget.js new file mode 100755 index 000000000..fc79953d0 --- /dev/null +++ b/multi_barcodes_pos/static/src/js/ProductWidget.js @@ -0,0 +1,40 @@ +/** @odoo-module */ + +import { patch } from "@web/core/utils/patch"; +import { PosDB } from "@point_of_sale/app/store/db"; +import { unaccent } from "@web/core/utils/strings"; + +patch(PosDB.prototype, { + search_product_in_category: function(category_id, query){ + var old_query = query + try { + // eslint-disable-next-line no-useless-escape + query = query.replace(/[\[\]\(\)\+\*\?\.\-\!\&\^\$\|\~\_\{\}\:\,\\\/]/g, "."); + query = query.replace(/ /g, ".+"); + var re = RegExp("([0-9]+):.*?" + unaccent(query), "gi"); + } catch { + return []; + } + var results = []; + for(var i = 0; i < this.limit; i++){ + var r = re.exec(this.category_search_string[category_id]); + if (r) { + var id = Number(r[1]); + const product = this.get_product_by_id(id); + if (!this.shouldAddProduct(product, results)) { + continue; + } + results.push(product); + }else if(this.product_by_lot_id[old_query]){ + const product = this.get_product_by_id(this.product_by_lot_id[old_query]); + if (!this.shouldAddProduct(product, results)) continue; + if(!results.includes(product)){ + results.push(product); + } + }else{ + break; + } + } + return results; + } +}); diff --git a/multi_barcodes_pos/static/src/js/pos_scan.js b/multi_barcodes_pos/static/src/js/pos_scan.js new file mode 100755 index 000000000..0c6485e59 --- /dev/null +++ b/multi_barcodes_pos/static/src/js/pos_scan.js @@ -0,0 +1,68 @@ +/** @odoo-module */ + +import { patch } from "@web/core/utils/patch"; +import { PosDB } from "@point_of_sale/app/store/db"; +import { unaccent } from "@web/core/utils/strings"; +import { jsonrpc } from "@web/core/network/rpc_service"; + +patch(PosDB.prototype, { + add_products(products) { + //Extends the add_products method of the PosDB class to include additional functionality for handling product barcodes. + var stored_categories = this.product_by_category_id; + if (!(products instanceof Array)) { + products = [products]; + } + for (var i = 0, len = products.length; i < len; i++) { + var product = products[i]; + if (product.id in this.product_by_id) { + continue; + } + if (product.available_in_pos) { + var search_string = unaccent(this._product_search_string(product)); + const all_categ_ids = product.pos_categ_ids.length + ? product.pos_categ_ids + : [this.root_category_id]; + product.product_tmpl_id = product.product_tmpl_id[0]; + for (const categ_id of all_categ_ids) { + if (!stored_categories[categ_id]) { + stored_categories[categ_id] = []; + } + stored_categories[categ_id].push(product.id); + if (this.category_search_string[categ_id] === undefined) { + this.category_search_string[categ_id] = ""; + } + this.category_search_string[categ_id] += search_string; + var ancestors = this.get_category_ancestors_ids(categ_id) || []; + for (var j = 0, jlen = ancestors.length; j < jlen; j++) { + var ancestor = ancestors[j]; + if (!stored_categories[ancestor]) { + stored_categories[ancestor] = []; + } + stored_categories[ancestor].push(product.id); + + if (this.category_search_string[ancestor] === undefined) { + this.category_search_string[ancestor] = ""; + } + this.category_search_string[ancestor] += search_string; + } + } + } + this.product_by_id[product.id] = product; + if (product.barcode && product.active) { + this.product_by_barcode[product.barcode] = product; + } + for (var t = 0; t < product.product_multi_barcodes_ids.length; t++) { + var self = this; + jsonrpc('/web/dataset/call_kw/multi.barcode.products/get_barcode_val', { + model: 'multi.barcode.products', + method: 'get_barcode_val', + args: [product.product_multi_barcodes_ids[t], product.id], + kwargs: {}, + }).then(function(barcode_val) { + self.product_by_barcode[barcode_val[0]] = self.product_by_id[barcode_val[1]]; + }); + } + } + return super.add_products(products); + }, +}); \ No newline at end of file diff --git a/multi_barcodes_pos/views/product_product_views.xml b/multi_barcodes_pos/views/product_product_views.xml new file mode 100755 index 000000000..e699d5c15 --- /dev/null +++ b/multi_barcodes_pos/views/product_product_views.xml @@ -0,0 +1,20 @@ + + + + + product.product.view.form.inherit.multi.barcodes.pos + product.product + + + + + + + + + + + + + + diff --git a/multi_barcodes_pos/views/product_template_views.xml b/multi_barcodes_pos/views/product_template_views.xml new file mode 100755 index 000000000..114a57075 --- /dev/null +++ b/multi_barcodes_pos/views/product_template_views.xml @@ -0,0 +1,22 @@ + + + + + product.template.view.form.inherit.multi.barcodes.pos + product.template + + + + + + + + + + + + + +