diff --git a/pos_pro_cross_selling/README.rst b/pos_pro_cross_selling/README.rst new file mode 100644 index 000000000..e92315053 --- /dev/null +++ b/pos_pro_cross_selling/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Cross-Selling +================= +This module allow to Manage POS Cross Selling products and use them in +Point of Sales in Odoo. + +Configuration +============= +The user should be added to the security group: Administrator(Point of Sale) +inorder to get access to the new menu. + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V16) Megha K @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/pos_pro_cross_selling/__init__.py b/pos_pro_cross_selling/__init__.py new file mode 100644 index 000000000..4ddf19602 --- /dev/null +++ b/pos_pro_cross_selling/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models diff --git a/pos_pro_cross_selling/__manifest__.py b/pos_pro_cross_selling/__manifest__.py new file mode 100644 index 000000000..ccb70864f --- /dev/null +++ b/pos_pro_cross_selling/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'POS Cross-Selling', + 'version': '16.0.1.0.0', + 'category': 'Point Of Sale', + 'sequence': '20', + 'summary': 'Cross Selling products in pos', + 'description': "This module is used for cross selling products in pos. " + "We can manage and use the cross-selling product in pos", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['point_of_sale'], + 'data': [ + 'security/ir.model.access.csv', + 'views/pos_cross_selling_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + '/pos_pro_cross_selling/static/src/js/CrossProduct.js', + '/pos_pro_cross_selling/static/src/xml/cross_product_templates.xml', + '/pos_pro_cross_selling/static/src/js/ProductItem.js', + '/pos_pro_cross_selling/static/src/scss/cross_product.scss' + ] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_pro_cross_selling/doc/RELEASE_NOTES.md b/pos_pro_cross_selling/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..eee87700a --- /dev/null +++ b/pos_pro_cross_selling/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 24.10.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for POS Cross-Selling diff --git a/pos_pro_cross_selling/models/__init__.py b/pos_pro_cross_selling/models/__init__.py new file mode 100644 index 000000000..bdeb0a8e1 --- /dev/null +++ b/pos_pro_cross_selling/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import pos_cross_selling diff --git a/pos_pro_cross_selling/models/pos_cross_selling.py b/pos_pro_cross_selling/models/pos_cross_selling.py new file mode 100644 index 000000000..750b936a8 --- /dev/null +++ b/pos_pro_cross_selling/models/pos_cross_selling.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class PosCrossSelling(models.Model): + """Model Pos Cross-Selling Products""" + _name = 'pos.cross.selling' + _description = 'POS Cross-Selling' + _rec_name = 'product_id' + + product_id = fields.Many2one('product.product', + domain=[('available_in_pos', '=', 'True')], + required=True, string='Product Name', + help="Product details") + active = fields.Boolean(string='Active', + help="To check the cross selling is active or not", + default=True) + pos_cross_product_ids = fields.One2many('pos.cross.selling.line', + 'pos_cross_product_id', + string='Pos Cross products', + help="Pos Cross products") + + @api.constrains('product_id') + def _check_product_id(self): + """This method for avoid multiple creation of pos + cross-selling products""" + for rec in self: + pos = self.env['pos.cross.selling'].search( + [('product_id', '=', rec.product_id.id)]) + if len(pos) > 1: + raise ValidationError(_('Already exist a cross product with the' + ' %s product ') % rec.product_id.name) + + @api.constrains('pos_cross_product_ids') + def _check_pos_cross_product_ids(self): + """This method for add cross product lines""" + for rec in self: + if len(rec.pos_cross_product_ids) < 0: + raise ValidationError(_("Please add the cross products lines")) + + def get_cross_selling_products(self, product_id): + """ + Getting the required values for the tables + and return the values to that template + """ + cross = self.env['pos.cross.selling'].search( + [('product_id', '=', product_id)]) + vals = [] + for rec in cross.pos_cross_product_ids: + vals.append({ + 'id': rec.product_id.id, + 'image': '/web/image?model=product.product&field=image_128&id=' + + str(rec.product_id.id), + 'name': rec.product_id.name, + 'symbol': rec.product_id.cost_currency_id.symbol, + 'price': rec.product_id.lst_price, + 'selected': False}) + return vals + + +class PosCrossSellingLine(models.Model): + """Pos Cross-Selling Products Line""" + _name = 'pos.cross.selling.line' + _description = 'POS Cross-Selling Product Line' + + product_id = fields.Many2one('product.product', + domain=[('available_in_pos', '=', 'True')], + required=True, string='Product Name', + help="Product details") + active = fields.Boolean(string='Active', + help="To check the cross selling is active or not", + default=True) + pos_cross_product_id = fields.Many2one('pos.cross.selling', + string='Pos Cross products', + help="Pos Cross products") diff --git a/pos_pro_cross_selling/security/ir.model.access.csv b/pos_pro_cross_selling/security/ir.model.access.csv new file mode 100644 index 000000000..2ed79d1cb --- /dev/null +++ b/pos_pro_cross_selling/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_cross_selling,access.pos.cross.selling,model_pos_cross_selling,base.group_user,1,0,0,0 +access_pos_cross_selling_line,access.pos.cross.selling.line,model_pos_cross_selling_line,base.group_user,1,0,0,0 +access_pos_cross_selling,access.pos.cross.selling,model_pos_cross_selling,point_of_sale.group_pos_manager,1,1,1,1 +access_pos_cross_selling_line,access.pos.cross.selling.line,model_pos_cross_selling_line,point_of_sale.group_pos_manager,1,1,1,1 diff --git a/pos_pro_cross_selling/static/description/assets/icons/check.png b/pos_pro_cross_selling/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/check.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/chevron.png b/pos_pro_cross_selling/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/chevron.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/cogs.png b/pos_pro_cross_selling/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/cogs.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/consultation.png b/pos_pro_cross_selling/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/consultation.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/ecom-black.png b/pos_pro_cross_selling/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/ecom-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/education-black.png b/pos_pro_cross_selling/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/education-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/hotel-black.png b/pos_pro_cross_selling/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/hotel-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/license.png b/pos_pro_cross_selling/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/license.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/lifebuoy.png b/pos_pro_cross_selling/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/manufacturing-black.png b/pos_pro_cross_selling/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/pos-black.png b/pos_pro_cross_selling/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/pos-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/puzzle.png b/pos_pro_cross_selling/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/puzzle.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/restaurant-black.png b/pos_pro_cross_selling/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/service-black.png b/pos_pro_cross_selling/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/service-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/trading-black.png b/pos_pro_cross_selling/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/trading-black.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/training.png b/pos_pro_cross_selling/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/training.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/update.png b/pos_pro_cross_selling/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/update.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/user.png b/pos_pro_cross_selling/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/user.png differ diff --git a/pos_pro_cross_selling/static/description/assets/icons/wrench.png b/pos_pro_cross_selling/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/wrench.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/categories.png b/pos_pro_cross_selling/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/categories.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/check-box.png b/pos_pro_cross_selling/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/check-box.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/compass.png b/pos_pro_cross_selling/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/compass.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/corporate.png b/pos_pro_cross_selling/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/corporate.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/customer-support.png b/pos_pro_cross_selling/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/customer-support.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/cybrosys-logo.png b/pos_pro_cross_selling/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/features.png b/pos_pro_cross_selling/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/features.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/logo.png b/pos_pro_cross_selling/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/logo.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/pictures.png b/pos_pro_cross_selling/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/pictures.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/pie-chart.png b/pos_pro_cross_selling/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/pie-chart.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/right-arrow.png b/pos_pro_cross_selling/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/right-arrow.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/star.png b/pos_pro_cross_selling/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/star.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/support.png b/pos_pro_cross_selling/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/support.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/whatsapp.png b/pos_pro_cross_selling/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/whatsapp.png differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/1.png b/pos_pro_cross_selling/static/description/assets/modules/1.png new file mode 100644 index 000000000..f5c24146b Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/1.png differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/2.png b/pos_pro_cross_selling/static/description/assets/modules/2.png new file mode 100644 index 000000000..05c8b4a69 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/2.png differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/3.png b/pos_pro_cross_selling/static/description/assets/modules/3.png new file mode 100644 index 000000000..a77027978 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/3.png differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/4.png b/pos_pro_cross_selling/static/description/assets/modules/4.png new file mode 100644 index 000000000..c247ba6ac Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/4.png differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/5.png b/pos_pro_cross_selling/static/description/assets/modules/5.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/5.png differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/6.png b/pos_pro_cross_selling/static/description/assets/modules/6.png new file mode 100644 index 000000000..c56c96bae Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/6.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/hero.gif b/pos_pro_cross_selling/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..ed4f89830 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/hero.gif differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/screenshot1.png b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..686b9a458 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot1.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/screenshot2.png b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..27aa6ef17 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot2.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/screenshot3.png b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..2a5e60134 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot3.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/screenshot4.png b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..29ee9857f Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot4.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/screenshot6.png b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..393301924 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/screenshot6.png differ diff --git a/pos_pro_cross_selling/static/description/banner.jpg b/pos_pro_cross_selling/static/description/banner.jpg new file mode 100644 index 000000000..ce5af801f Binary files /dev/null and b/pos_pro_cross_selling/static/description/banner.jpg differ diff --git a/pos_pro_cross_selling/static/description/icon.png b/pos_pro_cross_selling/static/description/icon.png new file mode 100644 index 000000000..66f28c66e Binary files /dev/null and b/pos_pro_cross_selling/static/description/icon.png differ diff --git a/pos_pro_cross_selling/static/description/index.html b/pos_pro_cross_selling/static/description/index.html new file mode 100644 index 000000000..f11628f0d --- /dev/null +++ b/pos_pro_cross_selling/static/description/index.html @@ -0,0 +1,586 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ POS Cross-Selling

+

POS Cross-Selling Products + +

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module is used to manage different POS Cross-Selling and use them in Point of Sales in Odoo. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Enterprise and Community compatible. +
+
+ + Create & Configure Cross-Selling Products +
+ +
+
+ +
+ + Cross Selling Apply on POS +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

POS Cross-Selling +

+

Under Point of Sale --> Configuration-->POS Cross-Selling. From this menu configure Cross-selling Products

+ +
+ +
+

Cross-Selling Product Configuration +

+

Configure the cross-selling products

+ +
+
+

POS Screen +

+

When we click on a product, if it has cross-selling products, a popup will open

+ +
+
+

Select the Products. +

+

Select the products in the popup, then click the confirm button.

+ +
+
+

Cross-Selling Products In oder line . +

+

In the order line we can view the Cross-Selling Products.

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

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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/pos_pro_cross_selling/static/src/js/CrossProduct.js b/pos_pro_cross_selling/static/src/js/CrossProduct.js new file mode 100644 index 000000000..e09186ee8 --- /dev/null +++ b/pos_pro_cross_selling/static/src/js/CrossProduct.js @@ -0,0 +1,45 @@ +odoo.define('pos_pro_cross_selling.CrossProducts', function(require) { + 'use strict'; + + const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup'); + const Registries = require('point_of_sale.Registries'); + const { useListener } = require("@web/core/utils/hooks"); + // Class for cross products + class CrossProducts extends AbstractAwaitablePopup { + setup() { + super.setup(); + useListener('click-product', this._onClickOrder); + } + async confirm() { + // Adding Products into the order line + super.confirm(); + var product = this.props.product + for(var i = 0; i < product.length; i++){ + if (product[i].selected == true){ + this.env.pos.get_order().add_product(this.env.pos.db.product_by_id[product[i].id]); + } + } + } + async _onClickOrder(event, product){ + //Selecting the cross products + var id = product.id + var product = this.props.product + var lines = [] + for(var i = 0; i < product.length; i++){ + if (product[i].id == id){ + if (product[i].selected == false){ + product[i].selected = true; + } + else if (product[i].selected == true){ + product[i].selected = false; + } + lines.push(product[i].name) + } + } + } + } + CrossProducts.template = 'CrossProducts'; + CrossProducts.defaultProps = { cancelKey: false }; + Registries.Component.add(CrossProducts); + return CrossProducts; +}); diff --git a/pos_pro_cross_selling/static/src/js/ProductItem.js b/pos_pro_cross_selling/static/src/js/ProductItem.js new file mode 100644 index 000000000..7044ca7a7 --- /dev/null +++ b/pos_pro_cross_selling/static/src/js/ProductItem.js @@ -0,0 +1,34 @@ +odoo.define('pos_pro_cross_selling.product_addons', function (require) { + "use strict"; + + const Registries = require('point_of_sale.Registries'); + var rpc = require('web.rpc'); + const { Gui } = require('point_of_sale.Gui'); + const ProductScreen = require('point_of_sale.ProductScreen'); + // Class for pos products + const PosProductAddons = ProductScreen => class extends ProductScreen { + setup(){ + //Supering the setup + super.setup(); + } + async _clickProduct(event) { + // Click Function for the products, It opens the pop up + super._clickProduct(...arguments) + const product = event.detail; + var self = this; + rpc.query({ + model: 'pos.cross.selling', + method: 'get_cross_selling_products', + args: [[],product.id], + }).then(function (result) { + if (result.length > 0) { + Gui.showPopup('CrossProducts', { + product: result + }); + } + }); + } + }; + Registries.Component.extend(ProductScreen, PosProductAddons); + return ProductScreen; +}); diff --git a/pos_pro_cross_selling/static/src/scss/cross_product.scss b/pos_pro_cross_selling/static/src/scss/cross_product.scss new file mode 100644 index 000000000..e130d2fb6 --- /dev/null +++ b/pos_pro_cross_selling/static/src/scss/cross_product.scss @@ -0,0 +1,20 @@ + +.extra-price{ +position: absolute; + top: 2px; + right: 2px; + vertical-align: top; + color: white; + line-height: 13px; + background: #ff6a6a; + padding: 2px 5px; + border-radius: 2px; +} +.ribbon-3 { + width: 30%; + color: white; + background: #5c723f; +} +.cross-price-tag{ + font-size: 15px; +} diff --git a/pos_pro_cross_selling/static/src/xml/cross_product_templates.xml b/pos_pro_cross_selling/static/src/xml/cross_product_templates.xml new file mode 100644 index 000000000..24fbaba55 --- /dev/null +++ b/pos_pro_cross_selling/static/src/xml/cross_product_templates.xml @@ -0,0 +1,50 @@ + + + + + + + diff --git a/pos_pro_cross_selling/views/pos_cross_selling_views.xml b/pos_pro_cross_selling/views/pos_cross_selling_views.xml new file mode 100644 index 000000000..11cc89f61 --- /dev/null +++ b/pos_pro_cross_selling/views/pos_cross_selling_views.xml @@ -0,0 +1,68 @@ + + + + + POS Cross-Selling + pos.cross.selling + tree,form + +

+ Create a new record for pos cross-selling +

+
+
+ + pos.cross.selling.view.form + pos.cross.selling + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + pos.cross.selling.view.tree + pos.cross.selling + + + + + + + + + pos.cross.selling + + + + + + + +