diff --git a/customer_screen_pos/README.rst b/customer_screen_pos/README.rst new file mode 100644 index 000000000..038c4408d --- /dev/null +++ b/customer_screen_pos/README.rst @@ -0,0 +1,41 @@ +.. 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 + +Customer Screen POS +=================== +This module allow the customer ensure their order and add review about service. + +Configuration +============= +Enable Customer Screen field in POS settings and also enable options to form screen type. + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer:(V17) Vishnu 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/customer_screen_pos/__init__.py b/customer_screen_pos/__init__.py new file mode 100755 index 000000000..5e0894900 --- /dev/null +++ b/customer_screen_pos/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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 controllers +from . import models diff --git a/customer_screen_pos/__manifest__.py b/customer_screen_pos/__manifest__.py new file mode 100755 index 000000000..ba39fa2d4 --- /dev/null +++ b/customer_screen_pos/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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': "Customer Screen POS", + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'POS Customer Screen. ' + 'This helps customers finalize their order and may add rating ' + 'and review.', + 'description': "A separate POS screen for customers to know their ordered " + "products and add their review and rating about services", + '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/res_config_settings_views.xml', + 'views/pos_order_views.xml', + 'views/pos_orderlines_templates.xml', + ], + 'assets': { + 'point_of_sale._assets_pos': [ + '/customer_screen_pos/static/src/js/pos_systray_icon.js', + '/customer_screen_pos/static/src/js/product_click.js', + '/customer_screen_pos/static/src/xml/pos_systray_icon.xml', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/customer_screen_pos/controllers/__init__.py b/customer_screen_pos/controllers/__init__.py new file mode 100755 index 000000000..6597aaf3e --- /dev/null +++ b/customer_screen_pos/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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 customer_screen_pos diff --git a/customer_screen_pos/controllers/customer_screen_pos.py b/customer_screen_pos/controllers/customer_screen_pos.py new file mode 100755 index 000000000..9e33a4206 --- /dev/null +++ b/customer_screen_pos/controllers/customer_screen_pos.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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 . +# +############################################################################### +import json +from odoo import http +from odoo.http import request + + +class AddMyProductReview(http.Controller): + """ AddMyProductReview class provides the functionality of creating + templates and model records about customer screen and customer reviews + Methods: + add_my_review(self, orderlinelist, total): + This get the order lines from pos and create a screen template + and return into pos js fil + customer_screen_pos(self): + For create default template for merge customer screen template + customer_review(self, review): + For create new records in model "pos.order.review" based on + customer review that we got from customer screen """ + @http.route('/add/my/review', type='json', auth='public') + def add_my_review(self, orderlinelist, total): + + """For pass records into order-lines template and return template body + to js file for generate new page""" + response = http.Response( + template='customer_screen_pos.customer_pos_screen', + qcontext={'orderlinelist': orderlinelist, 'total': total}) + return response.render() + + @http.route(['/customer/screen/'], type='http', auth="user", + website=True) + def customer_screen_pos(self): + """Default customer screen for merge orders list and review template""" + return (request.render + ("customer_screen_pos.customer_screen_pos_main_page")) + + @http.route(['/customer/review/'], type='json', auth="none", + website=False, csrf=False) + def customer_review(self, review): + """Get review and rating from customer screen and store into a new + model based on pos order reference""" + data = json.loads(review) + review_text = data[0]["review_text"] + review_star = data[0]["review_star"] + pos_order_review = request.env['pos.order.review'].sudo().search([]) + reviews_refer = [review_ref.pos_order_ref for review_ref in + pos_order_review] + if data[0]["order_name"] not in reviews_refer: + request.env['pos.order.review'].sudo().create({ + 'review_text': review_text if review_text else None, + 'review_star': review_star if review_star else None, + 'pos_session': data[0]["session"] if data[0][ + "session"] else None, + 'partner': data[0]["partner_id"] if data[0][ + "partner_id"] else None, + 'pos_order_ref': data[0]["order_name"] if data[0][ + "order_name"] else None, + }) + else: + request.env['pos.order.review'].sudo().search( + [('pos_order_ref', '=', data[0]['order_name'])]).sudo().write({ + 'review_text': review_text if review_text else None, + 'review_star': review_star if review_star else None, + 'pos_session': data[0]["session"] if data[0][ + "session"] else None, + 'partner': data[0]["partner_id"] if data[0][ + "partner_id"] else None, + }) diff --git a/customer_screen_pos/doc/RELEASE_NOTES.md b/customer_screen_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..40478588e --- /dev/null +++ b/customer_screen_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.03.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Customer Screen POS diff --git a/customer_screen_pos/models/__init__.py b/customer_screen_pos/models/__init__.py new file mode 100755 index 000000000..8dc4999d1 --- /dev/null +++ b/customer_screen_pos/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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_config +from . import pos_order +from . import pos_order_review +from . import res_config_settings diff --git a/customer_screen_pos/models/pos_config.py b/customer_screen_pos/models/pos_config.py new file mode 100644 index 000000000..e05354299 --- /dev/null +++ b/customer_screen_pos/models/pos_config.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class PosConfig(models.Model): + """Extend functionality of Point of Sale Configuration""" + _inherit = 'pos.config' + + allow_customer_screen = fields.Boolean(string="Customer Screen", + help='Allows the screen share with' + 'the customers') + allow_systray_icon = fields.Boolean(string="Allow Systray Button", + help='Allows the customer to set ' + 'screen open button in systray') + allow_product_click = fields.Boolean(string="Allow Product Click", + help='Allows the customer to set ' + 'screen open when click product') diff --git a/customer_screen_pos/models/pos_order.py b/customer_screen_pos/models/pos_order.py new file mode 100755 index 000000000..41e431990 --- /dev/null +++ b/customer_screen_pos/models/pos_order.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (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 functools import partial +from odoo import api, fields, models + + +class PosOrder(models.Model): + """Extend functionality of Point of Sale Order""" + _inherit = 'pos.order' + + rating = fields.Selection([ + ('0', '0'), + ('1', '1'), + ('2', '2'), + ('3', '3'), + ('4', '4'), + ('5', '5'), + ], default='5', string="Rating", help="Rating Stars") + rating_text = fields.Text(string="Feedback", help='Feedback of customers') + + @api.model + def _order_fields(self, ui_order): + """Function to fetch order details from POS and return to POS order""" + process_line = partial(self.env['pos.order.line']._order_line_fields, + session_id=ui_order['pos_session_id']) + pos_order_review = self.env['pos.order.review'].search( + [('pos_order_ref', '=', ui_order['name'])]) + return { + 'user_id': ui_order['user_id'] or False, + 'session_id': ui_order['pos_session_id'], + 'lines': [process_line(lines) for lines in ui_order['lines']] if + ui_order[ + 'lines'] else False, + 'pos_reference': ui_order['name'], + 'sequence_number': ui_order['sequence_number'], + 'partner_id': ui_order['partner_id'] or False, + 'date_order': ui_order['date_order'], + 'fiscal_position_id': ui_order['fiscal_position_id'], + 'pricelist_id': ui_order['pricelist_id'], + 'amount_paid': ui_order['amount_paid'], + 'last_order_preparation_change': ui_order['last_order_preparation_change'], + 'amount_total': ui_order['amount_total'], + 'amount_tax': ui_order['amount_tax'], + 'amount_return': ui_order['amount_return'], + 'company_id': self.env['pos.session'].browse( + ui_order['pos_session_id']).company_id.id, + 'to_invoice': ui_order[ + 'to_invoice'] if "to_invoice" in ui_order else False, + 'shipping_date': ui_order['shipping_date'] if "shipping_date" in ui_order else False, + 'is_tipped': ui_order.get('is_tipped', False), + 'tip_amount': ui_order.get('tip_amount', 0), + 'access_token': ui_order.get('access_token', ''), + 'rating': ("1" if pos_order_review.review_star == "star1" else + "2" if pos_order_review.review_star == "star2" else + "3" if pos_order_review.review_star == "star3" else + "4" if pos_order_review.review_star == "star4" else + "5"), + 'rating_text': pos_order_review.review_text + } diff --git a/customer_screen_pos/models/pos_order_review.py b/customer_screen_pos/models/pos_order_review.py new file mode 100644 index 000000000..c4ea8ae7f --- /dev/null +++ b/customer_screen_pos/models/pos_order_review.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class PoSOrderReview(models.Model): + """PoSOrderReview provides option to store customers reviews for their + POS orders in database""" + _name = 'pos.order.review' + _description = "POS Order Reviews" + + review_text = fields.Char(string="Review text", + help='To store review of customer' + 'from customer screen') + review_star = fields.Char(string="Review Star", + help='To store rating of customer' + 'from customer screen') + pos_session = fields.Integer(string="POS Session", + help='To store session id of pos') + partner = fields.Integer(string="Partner Id", help='for partner') + pos_order_ref = fields.Char(string="POS Order Reference", + help='To store each order reference') diff --git a/customer_screen_pos/models/res_config_settings.py b/customer_screen_pos/models/res_config_settings.py new file mode 100755 index 000000000..47b16105f --- /dev/null +++ b/customer_screen_pos/models/res_config_settings.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """This model extends the base configuration settings for Point of Sale + configurations.""" + _inherit = 'res.config.settings' + + allow_customer_screen = fields.Boolean(string="Customer Screen", + related="pos_config_id.allow_customer_screen", + readonly=False, + help='Allows the screen share with ' + 'the customers') + allow_systray_icon = fields.Boolean(string="Allow Systray Button", + related="pos_config_id.allow_systray_icon", + readonly=False, + help='Allows the customer to set ' + 'screen open button in systray') + allow_product_click = fields.Boolean(string="Allow Product Click", + related="pos_config_id.allow_product_click", + readonly=False, + help='Allows the customer to set ' + 'screen open when click product') diff --git a/customer_screen_pos/security/ir.model.access.csv b/customer_screen_pos/security/ir.model.access.csv new file mode 100644 index 000000000..1e67fd551 --- /dev/null +++ b/customer_screen_pos/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_order_review,access.pos.order.review,model_pos_order_review,base.group_user,1,1,1,1 diff --git a/customer_screen_pos/static/description/assets/icons/capture (1).png b/customer_screen_pos/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/capture (1).png differ diff --git a/customer_screen_pos/static/description/assets/icons/check.png b/customer_screen_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/check.png differ diff --git a/customer_screen_pos/static/description/assets/icons/chevron.png b/customer_screen_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/chevron.png differ diff --git a/customer_screen_pos/static/description/assets/icons/cogs.png b/customer_screen_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/cogs.png differ diff --git a/customer_screen_pos/static/description/assets/icons/consultation.png b/customer_screen_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/consultation.png differ diff --git a/customer_screen_pos/static/description/assets/icons/ecom-black.png b/customer_screen_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/ecom-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/education-black.png b/customer_screen_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/education-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/hotel-black.png b/customer_screen_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/hotel-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/img.png b/customer_screen_pos/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/img.png differ diff --git a/customer_screen_pos/static/description/assets/icons/license.png b/customer_screen_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/license.png differ diff --git a/customer_screen_pos/static/description/assets/icons/lifebuoy.png b/customer_screen_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/customer_screen_pos/static/description/assets/icons/manufacturing-black.png b/customer_screen_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/photo-capture.png b/customer_screen_pos/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/photo-capture.png differ diff --git a/customer_screen_pos/static/description/assets/icons/pos-black.png b/customer_screen_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/pos-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/puzzle.png b/customer_screen_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/puzzle.png differ diff --git a/customer_screen_pos/static/description/assets/icons/restaurant-black.png b/customer_screen_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/service-black.png b/customer_screen_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/service-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/trading-black.png b/customer_screen_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/trading-black.png differ diff --git a/customer_screen_pos/static/description/assets/icons/training.png b/customer_screen_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/training.png differ diff --git a/customer_screen_pos/static/description/assets/icons/update.png b/customer_screen_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/update.png differ diff --git a/customer_screen_pos/static/description/assets/icons/user.png b/customer_screen_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/user.png differ diff --git a/customer_screen_pos/static/description/assets/icons/wrench.png b/customer_screen_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/customer_screen_pos/static/description/assets/icons/wrench.png differ diff --git a/customer_screen_pos/static/description/assets/misc/Cybrosys R.png b/customer_screen_pos/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/Cybrosys R.png differ diff --git a/customer_screen_pos/static/description/assets/misc/email.svg b/customer_screen_pos/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/customer_screen_pos/static/description/assets/misc/phone.svg b/customer_screen_pos/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/customer_screen_pos/static/description/assets/misc/star (1) 2.svg b/customer_screen_pos/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/customer_screen_pos/static/description/assets/misc/support (1) 1.svg b/customer_screen_pos/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/customer_screen_pos/static/description/assets/misc/support-email.svg b/customer_screen_pos/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/customer_screen_pos/static/description/assets/misc/tick-mark.svg b/customer_screen_pos/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/customer_screen_pos/static/description/assets/misc/whatsapp 1.svg b/customer_screen_pos/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/customer_screen_pos/static/description/assets/misc/whatsapp.svg b/customer_screen_pos/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/customer_screen_pos/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/customer_screen_pos/static/description/assets/modules/m1.png b/customer_screen_pos/static/description/assets/modules/m1.png new file mode 100644 index 000000000..acb4c76c6 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/m1.png differ diff --git a/customer_screen_pos/static/description/assets/modules/m2.png b/customer_screen_pos/static/description/assets/modules/m2.png new file mode 100644 index 000000000..3ef91f771 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/m2.png differ diff --git a/customer_screen_pos/static/description/assets/modules/m3.png b/customer_screen_pos/static/description/assets/modules/m3.png new file mode 100644 index 000000000..72febf6ae Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/m3.png differ diff --git a/customer_screen_pos/static/description/assets/modules/m4.png b/customer_screen_pos/static/description/assets/modules/m4.png new file mode 100644 index 000000000..f7d7f9241 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/m4.png differ diff --git a/customer_screen_pos/static/description/assets/modules/m5.png b/customer_screen_pos/static/description/assets/modules/m5.png new file mode 100644 index 000000000..1d3324e88 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/m5.png differ diff --git a/customer_screen_pos/static/description/assets/modules/m6.png b/customer_screen_pos/static/description/assets/modules/m6.png new file mode 100644 index 000000000..80938c15a Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/m6.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/hero.gif b/customer_screen_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..719e98594 Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/hero.gif differ diff --git a/customer_screen_pos/static/description/assets/screenshots/ss1.png b/customer_screen_pos/static/description/assets/screenshots/ss1.png new file mode 100644 index 000000000..3efc1158f Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/ss1.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/ss2.png b/customer_screen_pos/static/description/assets/screenshots/ss2.png new file mode 100644 index 000000000..5db986351 Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/ss2.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/ss3.png b/customer_screen_pos/static/description/assets/screenshots/ss3.png new file mode 100644 index 000000000..c8ac99346 Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/ss3.png differ diff --git a/customer_screen_pos/static/description/banner.jpg b/customer_screen_pos/static/description/banner.jpg new file mode 100644 index 000000000..f10efc4fa Binary files /dev/null and b/customer_screen_pos/static/description/banner.jpg differ diff --git a/customer_screen_pos/static/description/icon.png b/customer_screen_pos/static/description/icon.png new file mode 100644 index 000000000..360da7de8 Binary files /dev/null and b/customer_screen_pos/static/description/icon.png differ diff --git a/customer_screen_pos/static/description/index.html b/customer_screen_pos/static/description/index.html new file mode 100644 index 000000000..233bd151f --- /dev/null +++ b/customer_screen_pos/static/description/index.html @@ -0,0 +1,595 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Customer Screen POS

+

+ Screen for Customers to Ensure their Order and Remark their Opinions. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Display the product on the customer screen.

+

Display of the items being scanned or added to the cart +

+
+
+
+
+
+
+ +
+
+

Real-time updates.

+

Real-time updates as items are added, removed, or modified in the order. +

+
+
+
+
+
+
+ +
+
+

+ Option to collect customer feedback.

+

The + Option to collect customer feedback or ratings for their shopping experience. +

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

+ Enable option from settings

+
Enable Customer Screen Allow option from Settings, also enable methods to show customer screen
+
+
+
+
+
+
+ +
+
+

+ Customer screen Option in systray

+
+
+
+
+
+
+
+ +
+
+

+ Customer Screen

+
+ The View of Customer Screen with Order lines and a button to open the Modal of Review Section
+
+
+
+
+
+
+
    +
  • + Order details in the second screen +
  • +
  • + Real time updation of the order +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:27th Mar 2024 +
+

+ Odoo 17 Customer Screen POS

+
+
+
+
+ +
+
+

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/customer_screen_pos/static/src/css/customer_screen_pos.css b/customer_screen_pos/static/src/css/customer_screen_pos.css new file mode 100644 index 000000000..16a1dae29 --- /dev/null +++ b/customer_screen_pos/static/src/css/customer_screen_pos.css @@ -0,0 +1,100 @@ +.pos_orderlines_list { + box-shadow: 0 0.1vh 0.1vh #aaaaaa; + color: #3E3E3E; + background-color: white; + height: 100%; + overflow-y: scroll; +} +.pos_orderlines { + padding-right: 1.5vw; + position: relative; + background-color: blue; + height: 100%; + overflow-y: scroll; + +} +table.pos_orderlines_items.pos_orderlines_header { + margin-left: auto; +} + +/* star */ +*{ + margin: 0; + padding: 0; +} +.rate { + float: left; + height: 46px; + padding: 0 10px; +} +.rate:not(:checked) > input { + position: absolute; + top: -9999px; +} +.rate:not(:checked) > label { + float: right; + width: 1em; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + font-size: 30px; + color: #ccc; +} +.rate:not(:checked) > label:before { + content: '★ '; +} +.rate > input:checked ~ label { + color: #ffc700; +} +.rate:not(:checked) > label:hover, +.rate:not(:checked) > label:hover ~ label { + color: #deb217; +} +.rate > input:checked + label:hover, +.rate > input:checked + label:hover ~ label, +.rate > input:checked ~ label:hover, +.rate > input:checked ~ label:hover ~ label, +.rate > label:hover ~ input:checked ~ label { + color: #c59b08; +} +/* star */ + +/* The Modal (background) */ +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); /* Black background with + opacity */ +} + +/* Modal Content */ +.modal-content { + background-color: #fefefe; + margin: 15% auto; + padding: 20px; + border: 1px solid #888; + width: 30%; +} + +/* Close Button */ +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; +} +.close:hover, +.close:focus { + color: black; + text-decoration: none; + cursor: pointer; +} + +.cust_scrn #wrapwrap { + display: none; +} diff --git a/customer_screen_pos/static/src/css/style.css b/customer_screen_pos/static/src/css/style.css new file mode 100644 index 000000000..a7b46ecb2 --- /dev/null +++ b/customer_screen_pos/static/src/css/style.css @@ -0,0 +1,72 @@ +body{ + background-color: #eee; +} + +div.stars { + + width: 270px; + + display: inline-block; + +} + + .mt-200{ + margin-top:200px; + } + +input.star { display: none; } + + + +label.star { + + float: right; + + padding: 10px; + + font-size: 36px; + + color: #4A148C; + + transition: all .2s; + +} + + + +input.star:checked ~ label.star:before { + + content: '\f005'; + + color: #FD4; + + transition: all .25s; + +} + + +input.star-5:checked ~ label.star:before { + + color: #FE7; + + text-shadow: 0 0 20px #952; + +} + + + +input.star-1:checked ~ label.star:before { color: #F62; } + + + +label.star:hover { transform: rotate(-15deg) scale(1.3); } + + + +label.star:before { + + content: '\f006'; + + font-family: FontAwesome; + +} \ No newline at end of file diff --git a/customer_screen_pos/static/src/js/customer_screen_pos.js b/customer_screen_pos/static/src/js/customer_screen_pos.js new file mode 100644 index 000000000..71604cf87 --- /dev/null +++ b/customer_screen_pos/static/src/js/customer_screen_pos.js @@ -0,0 +1,53 @@ + var modal = document.getElementById("myModal"); + var openModalBtn = document.getElementById("openModalBtn"); + var closeModal = document.getElementById("closeModal"); + + openModalBtn.addEventListener("click", function() { + modal.style.display = "block"; + }); + closeModal.addEventListener("click", function() { + modal.style.display = "none"; + }); + window.addEventListener("click", function(event) { + if (event.target == modal) { + modal.style.display = "none"; + } + }); + var review_star; + + function getStar() { + const starInputs = document.querySelectorAll('.stars input[type="radio"]'); + let selectedValue; + starInputs.forEach((input) => { + if (input.checked) { + selectedValue = input.value; + } + }); + review_star = selectedValue + } + + function myFunction() { + var pos_order = [] + var review_text = document.getElementById("productRating").value; + pos_order.push({ + 'review_text': review_text, + 'review_star': review_star, + 'session': document.querySelector('.session_id').value, + 'partner_id': document.querySelector('.partner_id').value, + 'order_name': document.querySelector('.order_name').value + }) + var review = JSON.stringify(pos_order) + $.ajax({ + url: '/customer/review/' + review, + type: 'post', + contentType: 'Application/json', + dataType: 'Application/json', + data: JSON.stringify({ + main: review + }), + success: function(data) {}, + error: function(data) {} + }) + modal.style.display = "none"; + } + diff --git a/customer_screen_pos/static/src/js/pos_systray_icon.js b/customer_screen_pos/static/src/js/pos_systray_icon.js new file mode 100755 index 000000000..a2c08c03c --- /dev/null +++ b/customer_screen_pos/static/src/js/pos_systray_icon.js @@ -0,0 +1,51 @@ +/** @odoo-module */ +import { Navbar } from "@point_of_sale/app/navbar/navbar"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import { patch } from "@web/core/utils/patch"; + +patch(Navbar.prototype, { + onClick() { + var self = this; + var total = 0 + var totalvalues = this.pos.selectedOrder.orderlines + totalvalues.forEach(function (totalvalues) { + total = total + (totalvalues.price * totalvalues.quantity) + }) + var orderlines = this.pos.selectedOrder.orderlines + var orderlinelist = []; + orderlines.forEach(function(orderline) { + // Perform operations with each orderline here + if (!orderlinelist.includes(orderline.product.display_name)) { + orderlinelist.push({ + 'id' : orderline.product.id, + 'name' : orderline.product.display_name, + 'price' : (orderline.price * orderline.quantity), + 'qty' : orderline.quantity, + 'session': self.pos.selectedOrder.pos_session_id, + 'partner_id': self.pos.selectedOrder.partner ? self.pos.selectedOrder.partner.id : null, + 'order_name': self.pos.selectedOrder.name, + 'total': total + }); + } + }); + jsonrpc('/add/my/review', {'orderlinelist': orderlinelist, 'total': total}) + .then(function (result) { + var encodedResult = result + var url = "/customer/screen/"; + fetch(url) + .then(function (response) { + return response.text(); + }) + .then(function (data) { + var modifiedData = data.replace('', '' + encodedResult); + var newWindow = window.open("", 'Customer Display Screen', 'height=500,width=900'); + newWindow.document.open(); + newWindow.document.write(modifiedData); + newWindow.document.close(); + }) + .catch(function (error) { + }); + }) + return this.pos.selectedOrder; + } + }); diff --git a/customer_screen_pos/static/src/js/product_click.js b/customer_screen_pos/static/src/js/product_click.js new file mode 100755 index 000000000..a38f5f5de --- /dev/null +++ b/customer_screen_pos/static/src/js/product_click.js @@ -0,0 +1,66 @@ +/** @odoo-module **/ + + /** + Function for generating customer screen when selecting a product to order + lines + */ +import { patch } from "@web/core/utils/patch"; +import { Order } from "@point_of_sale/app/store/models"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { jsonrpc } from "@web/core/network/rpc_service"; +var encodedResult + +patch(PosStore.prototype, { + /** + In here we get order-line records from pos and pass to controller for + creating template for customer screen using records, + In ajax then function we get customer screen template body then we merge + it with a demo template + */ + async addProductToCurrentOrder(product, options = {}) { + await super.addProductToCurrentOrder(product, options = {}) + + var self = this + var total = 0 + var totalvalues = self.selectedOrder.orderlines + totalvalues.forEach(function (totalvalues) { + total = total + (totalvalues.price * totalvalues.quantity)}) + var orderlines = this.selectedOrder.orderlines + var orderlinelist = []; + orderlines.forEach(function(orderline) { + + // Perform operations with each orderline here + if (!orderlinelist.includes(orderline.product.display_name)) { + orderlinelist.push({ + 'id' : orderline.product.id, + 'name' : orderline.product.display_name, + 'price' : (orderline.price * orderline.quantity), + 'qty' : orderline.quantity, + 'session': self.selectedOrder.pos_session_id, + 'partner_id': self.selectedOrder.partner ? self.selectedOrder.partner.id : null, + 'order_name': self.selectedOrder.name, + 'total': total + }); + } + }); + jsonrpc('/add/my/review', {'orderlinelist': orderlinelist, 'total': total}) + .then(function (result) { + encodedResult = result + var url = "/customer/screen/"; + fetch(url) + .then(function (response) { + return response.text(); + }) + .then(function (data) { + var modifiedData = data.replace('', '' + encodedResult + ''); + var newWindow = window.open("", 'Customer Display Screen', 'height=500,width=900'); + newWindow.document.open(); + newWindow.document.write(modifiedData); + newWindow.document.close(); + }) + .catch(function (error) { + }); + }) + return this.selectedOrder; + } +}); diff --git a/customer_screen_pos/static/src/xml/pos_systray_icon.xml b/customer_screen_pos/static/src/xml/pos_systray_icon.xml new file mode 100755 index 000000000..28eb42ec9 --- /dev/null +++ b/customer_screen_pos/static/src/xml/pos_systray_icon.xml @@ -0,0 +1,18 @@ + + + + + + + +
+
+