diff --git a/product_exchange_pos_sys/README.rst b/product_exchange_pos_sys/README.rst new file mode 100755 index 000000000..cfeb8e245 --- /dev/null +++ b/product_exchange_pos_sys/README.rst @@ -0,0 +1,48 @@ + .. 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 Exchange +======================= +This module Allow Customers to return or exchange their products + +Configuration +============ +No additional configurations needed + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V16) Megha K, + (V17) Ayana 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/product_exchange_pos_sys/__init__.py b/product_exchange_pos_sys/__init__.py new file mode 100644 index 000000000..b98ca9c59 --- /dev/null +++ b/product_exchange_pos_sys/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP (Contact : 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/product_exchange_pos_sys/__manifest__.py b/product_exchange_pos_sys/__manifest__.py new file mode 100644 index 000000000..1295aa09a --- /dev/null +++ b/product_exchange_pos_sys/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP (Contact : 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 Exchange', + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """ Helps customers to exchange their products """, + 'description': """ This module allow customers to return or exchange + their products """, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['point_of_sale'], + 'data': [ + 'views/pos_order_views.xml' + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'product_exchange_pos_sys/static/src/js/all_order_screen.js', + 'product_exchange_pos_sys/static/src/xml/all_order_screen.xml', + 'product_exchange_pos_sys/static/src/js/order_button.js', + 'product_exchange_pos_sys/static/src/xml/order_button.xml', + 'product_exchange_pos_sys/static/src/js/exchange_order.js', + 'product_exchange_pos_sys/static/src/xml/exchange_order.xml', + 'product_exchange_pos_sys/static/src/scss/pos.scss' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/product_exchange_pos_sys/doc/RELEASE_NOTES.md b/product_exchange_pos_sys/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..c6b1fbc72 --- /dev/null +++ b/product_exchange_pos_sys/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 18.06.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for POS Product Exchange diff --git a/product_exchange_pos_sys/models/__init__.py b/product_exchange_pos_sys/models/__init__.py new file mode 100644 index 000000000..af399dceb --- /dev/null +++ b/product_exchange_pos_sys/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP (Contact : 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_session +from . import pos_order diff --git a/product_exchange_pos_sys/models/pos_order.py b/product_exchange_pos_sys/models/pos_order.py new file mode 100644 index 000000000..f2785a053 --- /dev/null +++ b/product_exchange_pos_sys/models/pos_order.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP (Contact : 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 PosOrderLine(models.Model): + """Inheriting pos order line model to get product details""" + _inherit = "pos.order.line" + + @api.model + def get_product_details(self, ids): + """Function for get the product details""" + return [{ + 'product_id': rec.product_id.id, + 'name': rec.product_id.name, + 'qty': rec.qty + } for rec in self.browse(ids)] + + +class PosOrder(models.Model): + """ Inheriting pos order model for setting pos exchange order """ + _inherit = 'pos.order' + + exchange = fields.Boolean(string="Exchange", + help="Indicates if this order line contains" + " exchanged products.") + + @api.model + def get_pos_orders(self): + return [{ + 'id': rec.id, + 'pos_reference': rec.pos_reference, + 'name': rec.name, + 'partner_id': rec.partner_id.name if rec.partner_id else '', + 'date_order': rec.date_order, + 'lines': rec.lines.ids, + } for rec in self.sudo().search([('exchange', '=', False)])] + diff --git a/product_exchange_pos_sys/models/pos_session.py b/product_exchange_pos_sys/models/pos_session.py new file mode 100644 index 000000000..62dd108a9 --- /dev/null +++ b/product_exchange_pos_sys/models/pos_session.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ayana KP (Contact : 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): + """ Inheriting pos session for loading models and fields """ + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """ Load pos order line and pos order model """ + result = super()._pos_ui_models_to_load() + result += { + 'pos.order', 'pos.order.line' + } + return result + + def _loader_params_pos_order(self): + """ Load fields to pos session """ + return {'search_params': { + 'domain': [], + 'fields': ['name', 'date_order', 'pos_reference', + 'partner_id', 'lines', 'exchange']}} + + def _get_pos_ui_pos_order(self, params): + """ Load pos order to session """ + return self.env['pos.order'].search_read( + **params['search_params']) + + def _loader_params_pos_order_line(self): + """Load pos order line fields to session """ + return {'search_params': {'domain': [], + 'fields': ['product_id', 'qty', + 'price_subtotal', 'total_cost']}} + + def _get_pos_ui_pos_order_line(self, params): + """ Get pos order line models to pos session """ + return self.env['pos.order.line'].search_read( + **params['search_params']) diff --git a/product_exchange_pos_sys/static/description/assets/icons/check.png b/product_exchange_pos_sys/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/check.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/chevron.png b/product_exchange_pos_sys/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/chevron.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/cogs.png b/product_exchange_pos_sys/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/cogs.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/consultation.png b/product_exchange_pos_sys/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/consultation.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/ecom-black.png b/product_exchange_pos_sys/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/ecom-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/education-black.png b/product_exchange_pos_sys/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/education-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/hotel-black.png b/product_exchange_pos_sys/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/hotel-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/license.png b/product_exchange_pos_sys/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/license.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/lifebuoy.png b/product_exchange_pos_sys/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/lifebuoy.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/logo.png b/product_exchange_pos_sys/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/logo.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/manufacturing-black.png b/product_exchange_pos_sys/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/pos-black.png b/product_exchange_pos_sys/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/pos-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/puzzle.png b/product_exchange_pos_sys/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/puzzle.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/restaurant-black.png b/product_exchange_pos_sys/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/restaurant-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/service-black.png b/product_exchange_pos_sys/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/service-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/trading-black.png b/product_exchange_pos_sys/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/trading-black.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/training.png b/product_exchange_pos_sys/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/training.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/update.png b/product_exchange_pos_sys/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/update.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/user.png b/product_exchange_pos_sys/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/user.png differ diff --git a/product_exchange_pos_sys/static/description/assets/icons/wrench.png b/product_exchange_pos_sys/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/icons/wrench.png differ diff --git a/product_exchange_pos_sys/static/description/assets/misc/Cybrosys R.png b/product_exchange_pos_sys/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/misc/Cybrosys R.png differ diff --git a/product_exchange_pos_sys/static/description/assets/misc/email.svg b/product_exchange_pos_sys/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product_exchange_pos_sys/static/description/assets/misc/phone.svg b/product_exchange_pos_sys/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/product_exchange_pos_sys/static/description/assets/misc/star (1) 2.svg b/product_exchange_pos_sys/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_exchange_pos_sys/static/description/assets/misc/support (1) 1.svg b/product_exchange_pos_sys/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_exchange_pos_sys/static/description/assets/misc/support-email.svg b/product_exchange_pos_sys/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/product_exchange_pos_sys/static/description/assets/misc/tick-mark.svg b/product_exchange_pos_sys/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/product_exchange_pos_sys/static/description/assets/misc/whatsapp 1.svg b/product_exchange_pos_sys/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/product_exchange_pos_sys/static/description/assets/misc/whatsapp.svg b/product_exchange_pos_sys/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/product_exchange_pos_sys/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product_exchange_pos_sys/static/description/assets/modules/module_image (1).jpeg b/product_exchange_pos_sys/static/description/assets/modules/module_image (1).jpeg new file mode 100644 index 000000000..5ae24843e Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/modules/module_image (1).jpeg differ diff --git a/product_exchange_pos_sys/static/description/assets/modules/module_image (1).png b/product_exchange_pos_sys/static/description/assets/modules/module_image (1).png new file mode 100644 index 000000000..0dea4f332 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/modules/module_image (1).png differ diff --git a/product_exchange_pos_sys/static/description/assets/modules/module_image (2).png b/product_exchange_pos_sys/static/description/assets/modules/module_image (2).png new file mode 100644 index 000000000..a5dc79613 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/modules/module_image (2).png differ diff --git a/product_exchange_pos_sys/static/description/assets/modules/module_image-1.jpeg b/product_exchange_pos_sys/static/description/assets/modules/module_image-1.jpeg new file mode 100644 index 000000000..31f066e9c Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/modules/module_image-1.jpeg differ diff --git a/product_exchange_pos_sys/static/description/assets/modules/module_image.jpeg b/product_exchange_pos_sys/static/description/assets/modules/module_image.jpeg new file mode 100644 index 000000000..0cbac311c Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/modules/module_image.jpeg differ diff --git a/product_exchange_pos_sys/static/description/assets/modules/module_image.png b/product_exchange_pos_sys/static/description/assets/modules/module_image.png new file mode 100644 index 000000000..612be4b77 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/modules/module_image.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/1.png b/product_exchange_pos_sys/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..26020282b Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/1.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/2.png b/product_exchange_pos_sys/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..464f031e1 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/2.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/2024.png b/product_exchange_pos_sys/static/description/assets/screenshots/2024.png new file mode 100644 index 000000000..b7848e16c Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/2024.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/3.png b/product_exchange_pos_sys/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..c809593ed Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/3.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/4.png b/product_exchange_pos_sys/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..383689caf Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/4.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/5.png b/product_exchange_pos_sys/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..3da5442c6 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/5.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/hero-v17.gif b/product_exchange_pos_sys/static/description/assets/screenshots/hero-v17.gif new file mode 100644 index 000000000..d576ebb79 Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/hero-v17.gif differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/img.png b/product_exchange_pos_sys/static/description/assets/screenshots/img.png new file mode 100644 index 000000000..f83d4d80c Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/img.png differ diff --git a/product_exchange_pos_sys/static/description/assets/screenshots/img_1.png b/product_exchange_pos_sys/static/description/assets/screenshots/img_1.png new file mode 100644 index 000000000..f83d4d80c Binary files /dev/null and b/product_exchange_pos_sys/static/description/assets/screenshots/img_1.png differ diff --git a/product_exchange_pos_sys/static/description/banner.jpg b/product_exchange_pos_sys/static/description/banner.jpg new file mode 100644 index 000000000..85a846121 Binary files /dev/null and b/product_exchange_pos_sys/static/description/banner.jpg differ diff --git a/product_exchange_pos_sys/static/description/icon.png b/product_exchange_pos_sys/static/description/icon.png new file mode 100644 index 000000000..fcfaf62ae Binary files /dev/null and b/product_exchange_pos_sys/static/description/icon.png differ diff --git a/product_exchange_pos_sys/static/description/index.html b/product_exchange_pos_sys/static/description/index.html new file mode 100644 index 000000000..138e3ebc7 --- /dev/null +++ b/product_exchange_pos_sys/static/description/index.html @@ -0,0 +1,715 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ POS Product Exchange

+

+ Allow Customers To Return or Exchange Their + Products. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Exchange the pos products

+

Allows to exchange POS Products. +

+
+
+
+
+
+
+ +
+
+

+ User-friendly Interface

+

Provides a simple and intuitive interface + for customers to initiate return or exchange + requests. +

+
+
+
+
+
+
+ +
+
+

+ POS Product Exchange Management

+

Facilitate the + exchange of products by allowing customers to + select a replacement item of equal or lesser + value. +

+
+
+
+
+
+
+ +
+
+

+ Product Quantity Selection

+

Allow customers + to select a quantity of products to exchange. +

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

+ Click "All orders" button in POS to view all + orders screen.

+
+
+
+
+
+
+ +
+
+

+ From All Orders list,select an order to initiate the transfer of products.

+
+
+
+
+
+
+ +
+
+

+ On selecting the Order, a Popup will open which will show order details like the Product and it's Quantity. + You can select the quantity to exchange and then click on the "Exchange" button.

+
+
+
+
+
+
+ +
+
+

+ After clicking the "Exchange" button, It will show the + selected Products in the POS Orderline.

+
+
+
+
+
+
+ +
+
+

+ Add Product to exchange and validate + order.

+
+
+
+
+
+
+
    +
  • + Exchange the pos + products. +
  • +
  • + Return the pos + orders. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:18th June 2024 +
+

+ Initial Commit for POS Product Exchange

+
+
+
+
+
+
+
+

+ 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/product_exchange_pos_sys/static/src/js/all_order_screen.js b/product_exchange_pos_sys/static/src/js/all_order_screen.js new file mode 100644 index 000000000..675f73b5c --- /dev/null +++ b/product_exchange_pos_sys/static/src/js/all_order_screen.js @@ -0,0 +1,39 @@ +/** @odoo-module */ +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import { Component, useRef, useState } from "@odoo/owl"; +import { registry } from "@web/core/registry"; +import { useService } from "@web/core/utils/hooks"; +import { ExchangeOrder } from "./exchange_order"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +export class CustomOrderScreen extends Component { +//Extended the PosComponent to add button popup function + static template = "CustomOrderScreen" + setup() { + //Setup method called when the component is mounted. + super.setup(); + this.orm = useService("orm"); + this.pos = usePos() + this.state = useState({ + order: this.props.orders, + data: this.props.data, + pos: this.env.pos + }); + + this.popup = useService("popup"); + } + back() { + this.env.services.pos.showScreen('ProductScreen'); + } + async _onClickOrder(order, pos) { + //Function to show popup to show exchange product it that pos order. + let value = await this.orm.call("pos.order.line", "get_product_details",[order.lines]); + await this.popup.add(ExchangeOrder, { + 'order_line': value, + 'pos': pos, + 'order_id': order.id + }); + + } + }; +registry.category("pos_screens").add("CustomOrderScreen", CustomOrderScreen); diff --git a/product_exchange_pos_sys/static/src/js/exchange_order.js b/product_exchange_pos_sys/static/src/js/exchange_order.js new file mode 100644 index 000000000..89e24b6dc --- /dev/null +++ b/product_exchange_pos_sys/static/src/js/exchange_order.js @@ -0,0 +1,54 @@ +/** @odoo-module **/ +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { useState } from "@odoo/owl"; +import { useService } from "@web/core/utils/hooks"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; + /** + * Represents an Exchange Order popup in a point of sale system. + * This class extends the AbstractAwaitablePopup class and provides functionality + * for confirming an exchange order. The exchange order allows products to be + * added or removed from the current order based on the provided order line. + * @extends AbstractAwaitablePopup + */ + export class ExchangeOrder extends AbstractAwaitablePopup { + static template = 'ExchangeOrder'; + setup() { + // Super the setup function and set props.line and state.line + super.setup(); + this.orm = useService("orm"); + this.pos = usePos(); + this.props.line = JSON.parse(JSON.stringify(this.env.services.pos.pos_order_line) || '{}') + var qty = [] + for(var i = 0; i < this.props.order_line.length; i++){ + qty.push(this.props.order_line[i].qty) + } + this.state = useState({ + qty:qty, + line: JSON.parse(JSON.stringify(this.env.services.pos.pos_order_line) || '{}'), + pos: this.env.services.pos + }); + } + async confirm() { + // Iterate over each line in props.line and add or remove products from the CurrentOrder + for(var i = 0; i < this.props.order_line.length; i++){ + if(this.state.qty[i] < this.props.order_line[i].qty){ + this.pos.popup.add(ErrorPopup, { + title: 'Exchange order', + body: 'The selected product quantity is higher than the actual quantity in the order.' + }); + } + else{ + if (this.props.order_line[i].qty != 0){ + this.env.services.pos.get_order().add_product(this.env.services.pos.db.get_product_by_id(this.props.order_line[i].product_id), {quantity: - this.props.order_line[i].qty}) + } + } + } + await this.orm.write("pos.order", [this.props.order_id], { + exchange: true, + }); + this.env.services.pos.showScreen('ProductScreen'); + // Show the 'ProductScreen' and invoke the confirm method of the parent class + super.confirm(); + } + } diff --git a/product_exchange_pos_sys/static/src/js/order_button.js b/product_exchange_pos_sys/static/src/js/order_button.js new file mode 100644 index 000000000..b5a28e747 --- /dev/null +++ b/product_exchange_pos_sys/static/src/js/order_button.js @@ -0,0 +1,20 @@ +/** @odoo-module **/ +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +class OrderLineALLButton extends ProductScreen { + static template = "OrderLineALL"; + setup() { + super.setup(); + } + async onClick() { +// Order line button Onclick() + let data = await this.orm.call('pos.order', 'get_pos_orders',[]) + await this.pos.showScreen('CustomOrderScreen', { + orders: this.env.services.pos.pos_orders, + data: data, + pos: this.env.services.pos + }); + } +} +ProductScreen.addControlButton({ + component: OrderLineALLButton, +}); diff --git a/product_exchange_pos_sys/static/src/scss/pos.scss b/product_exchange_pos_sys/static/src/scss/pos.scss new file mode 100644 index 000000000..9f72b3253 --- /dev/null +++ b/product_exchange_pos_sys/static/src/scss/pos.scss @@ -0,0 +1,33 @@ +.order-list{ + font-size: 16px; + width: 100%; +} +.order-list thead{ + font-size: 23px; + background-color: lightslategrey; + color: white; +} +.order-list th, +.order-list td { + padding: 12px; +} +.order-list tbody :hover{ + background-color: silver; +} +exchange-list{ + font-size: 16px; + width: 100%; +} +.exchange-list th, +.exchange-list td { + padding: 10px; +} +.clientlist-screen{ + background-color:white; +} +.back { + background-color: revert; +} +.exchange-header{ + padding: 10px; +} \ No newline at end of file diff --git a/product_exchange_pos_sys/static/src/xml/all_order_screen.xml b/product_exchange_pos_sys/static/src/xml/all_order_screen.xml new file mode 100644 index 000000000..09e39298b --- /dev/null +++ b/product_exchange_pos_sys/static/src/xml/all_order_screen.xml @@ -0,0 +1,54 @@ + + + + +
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + +
Order ReferenceReceipt ReferenceCustomerOrder Date
+ + + +
+
+
+
+
+
+
+
+
+
diff --git a/product_exchange_pos_sys/static/src/xml/exchange_order.xml b/product_exchange_pos_sys/static/src/xml/exchange_order.xml new file mode 100644 index 000000000..f7c781060 --- /dev/null +++ b/product_exchange_pos_sys/static/src/xml/exchange_order.xml @@ -0,0 +1,36 @@ + + + + + + + diff --git a/product_exchange_pos_sys/static/src/xml/order_button.xml b/product_exchange_pos_sys/static/src/xml/order_button.xml new file mode 100644 index 000000000..3dfca9645 --- /dev/null +++ b/product_exchange_pos_sys/static/src/xml/order_button.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/product_exchange_pos_sys/views/pos_order_views.xml b/product_exchange_pos_sys/views/pos_order_views.xml new file mode 100644 index 000000000..253dc9785 --- /dev/null +++ b/product_exchange_pos_sys/views/pos_order_views.xml @@ -0,0 +1,16 @@ + + + + + + pos.order.view.form.inherit.product.exchange.pos.sys + + pos.order + + + + + + + +