diff --git a/pos_pro_cross_selling/README.rst b/pos_pro_cross_selling/README.rst new file mode 100644 index 000000000..a14494b2f --- /dev/null +++ b/pos_pro_cross_selling/README.rst @@ -0,0 +1,47 @@ +.. 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 Cross-Selling +================= +This module allow to Manage POS Cross Selling products and use them in +Point of Sales in Odoo. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +======= +General Public License, version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer : (V17) Bhagyadev KP, 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..3415190f3 --- /dev/null +++ b/pos_pro_cross_selling/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# 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..d408ee64e --- /dev/null +++ b/pos_pro_cross_selling/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +{ + 'name': 'POS Cross-Selling', + 'version': '17.0.1.0.0', + 'category': 'Point Of Sale', + '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': [ + '/pos_pro_cross_selling/static/src/app/cross_product/cross_product.js', + '/pos_pro_cross_selling/static/src/app/cross_product/cross_product.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..058869239 --- /dev/null +++ b/pos_pro_cross_selling/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 21.06.2024 +#### Version 17.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..793e50776 --- /dev/null +++ b/pos_pro_cross_selling/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from . import pos_cross_selling +from . import pos_cross_selling_line + 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..9c1d41334 --- /dev/null +++ b/pos_pro_cross_selling/models/pos_cross_selling.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# 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 diff --git a/pos_pro_cross_selling/models/pos_cross_selling_line.py b/pos_pro_cross_selling/models/pos_cross_selling_line.py new file mode 100644 index 000000000..fc18e6701 --- /dev/null +++ b/pos_pro_cross_selling/models/pos_cross_selling_line.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from odoo import fields, models + + +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..ae8a069f1 --- /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_user,access.pos.cross.selling.user,model_pos_cross_selling,base.group_user,1,0,0,0 +access_pos_cross_selling_line_user,access.pos.cross.selling.line.user,model_pos_cross_selling_line,base.group_user,1,0,0,0 +access_pos_cross_selling_manager,access.pos.cross.selling.manager,model_pos_cross_selling,point_of_sale.group_pos_manager,1,1,1,1 +access_pos_cross_selling_line_manager,access.pos.cross.selling.line.manager,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/capture (1).png b/pos_pro_cross_selling/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/capture (1).png differ 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/img.png b/pos_pro_cross_selling/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/img.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/photo-capture.png b/pos_pro_cross_selling/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/pos_pro_cross_selling/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/misc/Cybrosys R.png differ diff --git a/pos_pro_cross_selling/static/description/assets/misc/email.svg b/pos_pro_cross_selling/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_pro_cross_selling/static/description/assets/misc/phone.svg b/pos_pro_cross_selling/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/pos_pro_cross_selling/static/description/assets/misc/star (1) 2.svg b/pos_pro_cross_selling/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_pro_cross_selling/static/description/assets/misc/support (1) 1.svg b/pos_pro_cross_selling/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_pro_cross_selling/static/description/assets/misc/support-email.svg b/pos_pro_cross_selling/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pos_pro_cross_selling/static/description/assets/misc/tick-mark.svg b/pos_pro_cross_selling/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/pos_pro_cross_selling/static/description/assets/misc/whatsapp 1.svg b/pos_pro_cross_selling/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_pro_cross_selling/static/description/assets/misc/whatsapp.svg b/pos_pro_cross_selling/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/pos_pro_cross_selling/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_pro_cross_selling/static/description/assets/modules/1.jpg b/pos_pro_cross_selling/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..08bbafeb6 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/1.jpg 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..a1209a01f 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.jpg b/pos_pro_cross_selling/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..3d171226b Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/3.jpg differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/4.jpg b/pos_pro_cross_selling/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..1f3f2e27f Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/4.jpg differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/5.jpg b/pos_pro_cross_selling/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..0db717519 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/5.jpg differ diff --git a/pos_pro_cross_selling/static/description/assets/modules/6.jpg b/pos_pro_cross_selling/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..cd62a577c Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/modules/6.jpg differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/1.png b/pos_pro_cross_selling/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..ca1ab984e Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/1.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/2.png b/pos_pro_cross_selling/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..76db5b987 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/2.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/3.png b/pos_pro_cross_selling/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..25164b175 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/3.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/4.png b/pos_pro_cross_selling/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..4c09ac91f Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/4.png differ diff --git a/pos_pro_cross_selling/static/description/assets/screenshots/5.png b/pos_pro_cross_selling/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..283ab9d63 Binary files /dev/null and b/pos_pro_cross_selling/static/description/assets/screenshots/5.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..812acb356 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/banner.jpg b/pos_pro_cross_selling/static/description/banner.jpg new file mode 100644 index 000000000..d8d6150e8 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..aa0fa3380 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..cd4212903 --- /dev/null +++ b/pos_pro_cross_selling/static/description/index.html @@ -0,0 +1,701 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

POS Cross-Selling

+

+ This Module Helps To Cross Sell Products In POS. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Create & Configure Cross-Selling Products.

+
+
+
+
+
+
+ +
+
+

+ Cross Selling In POS.

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

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

+
+
+
+
+
+
+ +
+
+

+ Configure the cross-selling products.

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+ +
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

+ In the order line we can view the + Cross-Selling products.

+
+
+
+
+
+
+
    +
  • + Create & Configure Cross-Selling Products. +
  • +
  • + Cross Selling In POS. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:25th June 2024 +
+

+ Initial Commit for POS Cross-Selling.

+
+
+
+
+
+
+
+

+ 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/pos_pro_cross_selling/static/src/app/cross_product/cross_product.js b/pos_pro_cross_selling/static/src/app/cross_product/cross_product.js new file mode 100644 index 000000000..b8168ff39 --- /dev/null +++ b/pos_pro_cross_selling/static/src/app/cross_product/cross_product.js @@ -0,0 +1,47 @@ +/** @odoo-module */ +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { _t } from "@web/core/l10n/translation"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { useRef, onMounted } from "@odoo/owl"; +/** +* This class represents a custom popup in the Point of Sale. +* It extends the AbstractAwaitablePopup class. +*/ +export class CrossProduct extends AbstractAwaitablePopup { + static template = "pos_pro_cross_selling.CrossProduct"; + static defaultProps = { + closePopup: _t("Cancel"), + confirmPopup: _t("Confirm"), + title: _t("Cross Selling Products"), + }; + setup() { + super.setup(); + } + 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.services.pos.get_order().add_product(this.env.services.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) + } + } + } +} \ No newline at end of file diff --git a/pos_pro_cross_selling/static/src/app/cross_product/cross_product.xml b/pos_pro_cross_selling/static/src/app/cross_product/cross_product.xml new file mode 100644 index 000000000..edcca3aab --- /dev/null +++ b/pos_pro_cross_selling/static/src/app/cross_product/cross_product.xml @@ -0,0 +1,54 @@ + + + + + + + \ No newline at end of file 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..4a3edfdc2 --- /dev/null +++ b/pos_pro_cross_selling/static/src/js/ProductItem.js @@ -0,0 +1,31 @@ +/** @odoo-module **/ +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import { patch } from "@web/core/utils/patch"; +import { ProductConfiguratorPopup } from "@point_of_sale/app/store/product_configurator_popup/product_configurator_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { _t } from "@web/core/l10n/translation"; +import { CrossProduct } from "@pos_pro_cross_selling/app/cross_product/cross_product"; + +//Patching PosStore +patch(PosStore.prototype, { +// function to add the selected product to the order + async addProductToCurrentOrder(product, options = {}) { + jsonrpc('/web/dataset/call_kw/pos.cross.selling/get_cross_selling_products', { + model: 'pos.cross.selling', + method: 'get_cross_selling_products', + args: [[],product.id], + kwargs: {}, + }).then(async(result) => { + if (result.length > 0) { + await this.popup.add(CrossProduct, { + product: result + }); + this.env.services.pos.get_order().add_product(product); + } + else { + return super.addProductToCurrentOrder(...arguments); + } + }); + }, +}); 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..d817dbd6b --- /dev/null +++ b/pos_pro_cross_selling/static/src/scss/cross_product.scss @@ -0,0 +1,19 @@ +.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/views/pos_cross_selling_views.xml b/pos_pro_cross_selling/views/pos_cross_selling_views.xml new file mode 100644 index 000000000..9b1f18324 --- /dev/null +++ b/pos_pro_cross_selling/views/pos_cross_selling_views.xml @@ -0,0 +1,73 @@ + + + + + pos.cross.selling.view.form + pos.cross.selling + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + + pos.cross.selling.view.tree + pos.cross.selling + + + + + + + + + + pos.cross.selling + + + + + + + + + POS Cross-Selling + pos.cross.selling + tree,form + +

+ Create a new record for pos cross-selling +

+
+
+ + + +