diff --git a/customer_screen_pos/README.rst b/customer_screen_pos/README.rst new file mode 100644 index 000000000..f34955f36 --- /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:(V16) Ansil P V, 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..cc301a191 --- /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: Ansil pv (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..bffb73d67 --- /dev/null +++ b/customer_screen_pos/__manifest__.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ansil pv (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': '16.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': [ + '/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', + ], + 'web.assets_frontend': [ + 'customer_screen_pos/static/src/css/customer_screen_pos.css' + ] + }, + '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..cf9ffce12 --- /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: Ansil pv (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..41b4abec6 --- /dev/null +++ b/customer_screen_pos/controllers/customer_screen_pos.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ansil pv (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'].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..164d03605 --- /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: Ansil pv (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..eee0859c7 --- /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: Ansil pv (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..6a960928d --- /dev/null +++ b/customer_screen_pos/models/pos_order.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ansil pv (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['creation_date'].replace('T', ' ')[:19], + 'fiscal_position_id': ui_order['fiscal_position_id'], + 'pricelist_id': ui_order['pricelist_id'], + 'amount_paid': ui_order['amount_paid'], + '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, + 'to_ship': ui_order['to_ship'] if "to_ship" 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..02bced111 --- /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: Ansil pv (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..5efae2602 --- /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: Ansil pv (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/check.png b/customer_screen_pos/static/description/assets/icons/check.png new file mode 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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/license.png b/customer_screen_pos/static/description/assets/icons/license.png new file mode 100755 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 100755 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 100755 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/pos-black.png b/customer_screen_pos/static/description/assets/icons/pos-black.png new file mode 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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/categories.png b/customer_screen_pos/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/categories.png differ diff --git a/customer_screen_pos/static/description/assets/misc/check-box.png b/customer_screen_pos/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/check-box.png differ diff --git a/customer_screen_pos/static/description/assets/misc/compass.png b/customer_screen_pos/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/compass.png differ diff --git a/customer_screen_pos/static/description/assets/misc/corporate.png b/customer_screen_pos/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/corporate.png differ diff --git a/customer_screen_pos/static/description/assets/misc/customer-support.png b/customer_screen_pos/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/customer-support.png differ diff --git a/customer_screen_pos/static/description/assets/misc/cybrosys-logo.png b/customer_screen_pos/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/cybrosys-logo.png differ diff --git a/customer_screen_pos/static/description/assets/misc/features.png b/customer_screen_pos/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/features.png differ diff --git a/customer_screen_pos/static/description/assets/misc/logo.png b/customer_screen_pos/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/logo.png differ diff --git a/customer_screen_pos/static/description/assets/misc/pictures.png b/customer_screen_pos/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/pictures.png differ diff --git a/customer_screen_pos/static/description/assets/misc/pie-chart.png b/customer_screen_pos/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/pie-chart.png differ diff --git a/customer_screen_pos/static/description/assets/misc/right-arrow.png b/customer_screen_pos/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/right-arrow.png differ diff --git a/customer_screen_pos/static/description/assets/misc/star.png b/customer_screen_pos/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/star.png differ diff --git a/customer_screen_pos/static/description/assets/misc/support.png b/customer_screen_pos/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/support.png differ diff --git a/customer_screen_pos/static/description/assets/misc/whatsapp.png b/customer_screen_pos/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/customer_screen_pos/static/description/assets/misc/whatsapp.png differ diff --git a/customer_screen_pos/static/description/assets/modules/1.png b/customer_screen_pos/static/description/assets/modules/1.png new file mode 100644 index 000000000..5ecc4d883 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/1.png differ diff --git a/customer_screen_pos/static/description/assets/modules/2.png b/customer_screen_pos/static/description/assets/modules/2.png new file mode 100644 index 000000000..d1d3775d6 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/2.png differ diff --git a/customer_screen_pos/static/description/assets/modules/3.png b/customer_screen_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..dcbd0cb06 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/3.png differ diff --git a/customer_screen_pos/static/description/assets/modules/4.png b/customer_screen_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/4.png differ diff --git a/customer_screen_pos/static/description/assets/modules/5.png b/customer_screen_pos/static/description/assets/modules/5.png new file mode 100644 index 000000000..05c8b4a69 Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/5.png differ diff --git a/customer_screen_pos/static/description/assets/modules/6.png b/customer_screen_pos/static/description/assets/modules/6.png new file mode 100644 index 000000000..f5c24146b Binary files /dev/null and b/customer_screen_pos/static/description/assets/modules/6.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/0.png b/customer_screen_pos/static/description/assets/screenshots/0.png new file mode 100644 index 000000000..03b6917e3 Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/0.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/1.png b/customer_screen_pos/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..eba7d0c6d Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/1.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/2.png b/customer_screen_pos/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..dff35d5e0 Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/2.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/3.png b/customer_screen_pos/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..2c8a91560 Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/3.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/4.png b/customer_screen_pos/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..e9fcb90dc Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/4.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/5.png b/customer_screen_pos/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..7080ec282 Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/5.png differ diff --git a/customer_screen_pos/static/description/assets/screenshots/6.png b/customer_screen_pos/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..ed5be605c Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/6.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..e28ca212f Binary files /dev/null and b/customer_screen_pos/static/description/assets/screenshots/hero.gif 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..6e1b0887d 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..cf58f0526 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 100755 index 000000000..0c6f87f3c --- /dev/null +++ b/customer_screen_pos/static/description/index.html @@ -0,0 +1,564 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Customer Screen POS +

+

Screen for Customers to Ensure their Order and Remark their Opinions

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ The Customer Screen feature enables a dual-screen setup in your retail + store. You have the primary screen where the cashier operates the POS, and + the secondary customer-facing screen, often positioned to display + information to the customer. +
+ The primary purpose of the Customer Screen is to engage customers during + the checkout process. It provides real-time information about the products + being scanned or added to the cart, including names, quantities, prices. +
+ +
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Display of the items being scanned or added to the cart +
+
+ + Real-time updates as items are added, removed, or modified in the order. +
+
+
+
+ + Running total of the order amount. +
+
+ + Option to collect customer feedback or ratings for their shopping experience. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+
+

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

+ +
+ +
+

A systray icon to open the customer screen at any time with updated order lines

+ +
+ +
+

Each time we click on the product the customer screen will be updated

+ +
+ +
+

The View of Customer Screen with Order lines and a button to open the Modal of Review Section

+ +
+ +
+

Section for adding Rating and Feedback Fields for Customers

+ +
+ +
+

View of Customer added Review and Feedback's

+ +
+ +
+

The Review and Feedback Automatically Store in Order View in Backend when Payment Confirm

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

+ Related + Products +

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

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/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..5fd99e6f6 --- /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; + 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/js/pos_systray_icon.js b/customer_screen_pos/static/src/js/pos_systray_icon.js new file mode 100755 index 000000000..137f49896 --- /dev/null +++ b/customer_screen_pos/static/src/js/pos_systray_icon.js @@ -0,0 +1,78 @@ +odoo.define('customer_screen_pos.SystrayButtonScreen', function(require) { +'use strict'; + /** + Function to set systray button for open Customer Screen + */ + const PosComponent = require('point_of_sale.PosComponent'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const { useListener } = require("@web/core/utils/hooks"); + const Registries = require('point_of_sale.Registries'); + const ControlButtonsMixin = require('point_of_sale.ControlButtonsMixin'); + var ajax = require('web.ajax'); + var encodedResult + class SystrayButtonScreen extends ControlButtonsMixin(PosComponent) { + /** + 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 + */ + setup() { + super.setup(); + useListener('click', this.onClick); + } + get currentOrder() { + var self = this; + var total = 0 + var totalvalues = this.env.pos.selectedOrder.orderlines + totalvalues.forEach(function (totalvalues) { + total = total + (totalvalues.price * totalvalues.quantity) + }) + var orderlines = this.env.pos.get_order().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.env.pos.get_order().pos.pos_session.id, + 'partner_id': self.env.pos.get_order().partner ? self.env.pos.get_order().partner.id : null, + 'order_name': self.env.pos.get_order().name, + 'total': total + }); + } + }); + ajax.jsonRpc('/add/my/review', 'call', {'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) { + console.log('Error:', error); + }); + }) + return this.env.pos.get_order(); + } + async onClick() { + if (this.env.pos.config.allow_systray_icon) { + const currentOrderLines = this.currentOrder; + } + } + } + SystrayButtonScreen.template = 'SystrayButtonScreen'; + Registries.Component.add(SystrayButtonScreen); + return SystrayButtonScreen; +}); 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..4a2d2c9df --- /dev/null +++ b/customer_screen_pos/static/src/js/product_click.js @@ -0,0 +1,70 @@ +odoo.define('customer_screen_pos.ProductItemClick', function (require) { + "use strict"; + /** + Function for generating customer screen when selecting a product to order + lines + */ + const ProductScreen = require('point_of_sale.ProductScreen'); + const Registries = require('point_of_sale.Registries'); + var ajax = require('web.ajax'); + var encodedResult + const ProductItemClick = (ProductScreen) => class ProductItemClick + extends ProductScreen { + /** + 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 _clickProduct(event) { + await super._clickProduct(event) + if (this.env.pos.config.allow_product_click) { + var self = this + var total = 0 + var totalvalues = this.env.pos.selectedOrder.orderlines + totalvalues.forEach(function (totalvalues) { + total = total + (totalvalues.price * totalvalues.quantity) + }) + var orderlines = this.env.pos.get_order().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.env.pos.get_order().pos.pos_session.id, + 'partner_id': self.env.pos.get_order().partner ? self.env.pos.get_order().partner.id : null, + 'order_name': self.env.pos.get_order().name, + 'total': total + }); + } + }); + ajax.jsonRpc('/add/my/review', 'call', {'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) { + console.log('Error:', error); + }); + }) + return this.env.pos.get_order(); + } + } + } + ProductItemClick.template = 'ShowProductImages'; + Registries.Component.extend(ProductScreen, ProductItemClick); +}); 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..fc3b99e5d --- /dev/null +++ b/customer_screen_pos/static/src/xml/pos_systray_icon.xml @@ -0,0 +1,20 @@ + + + + +
+
+