diff --git a/pos_restaurant_web_menu/README.rst b/pos_restaurant_web_menu/README.rst new file mode 100644 index 000000000..9fb782316 --- /dev/null +++ b/pos_restaurant_web_menu/README.rst @@ -0,0 +1,50 @@ +.. 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 Restaurant Web Menu +======================= +This module help to create Pos Order from POS Restaurant Web Menu.From menu +item 'Mobile Menu' in POS dash board can redirect to POS Restaurant Web Menu +page and add items to cart and place the order. + +Configuration +============= +* Enable pos web menu from configuration. +* User can view pos restaurant web menu and create orders. + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer : (V16) Developer Anagha S, +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/pos_restaurant_web_menu/__init__.py b/pos_restaurant_web_menu/__init__.py new file mode 100644 index 000000000..512819c2d --- /dev/null +++ b/pos_restaurant_web_menu/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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/pos_restaurant_web_menu/__manifest__.py b/pos_restaurant_web_menu/__manifest__.py new file mode 100644 index 000000000..507ed33af --- /dev/null +++ b/pos_restaurant_web_menu/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 Restaurant Web Menu', + 'version': '16.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'This module help to view Pos Restaurant Website Menu', + 'description': """This module create pos restaurant website menu for + Restaurant and create new order from web and generate Qr code of POS App + that allows customers to view the menu on their smartphone.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['pos_restaurant'], + 'data': [ + 'report/pos_restaurant_web_menu_reports.xml', + 'report/pos_restaurant_web_menu_report_templates.xml', + 'views/pos_restaurant_web_menu_templates.xml', + 'views/res_config_settings_views.xml', + 'views/pos_config_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'pos_restaurant_web_menu/static/src/css/pos_restaurant_web_menu.css', + 'pos_restaurant_web_menu/static/src/js/pos_restaurant_web_menu.js', + ], + }, + 'images': [ + 'static/description/banner.jpg', + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_restaurant_web_menu/controllers/__init__.py b/pos_restaurant_web_menu/controllers/__init__.py new file mode 100644 index 000000000..fd0d824a8 --- /dev/null +++ b/pos_restaurant_web_menu/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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_restaurant_web_menu diff --git a/pos_restaurant_web_menu/controllers/pos_restaurant_web_menu.py b/pos_restaurant_web_menu/controllers/pos_restaurant_web_menu.py new file mode 100644 index 000000000..c11457b65 --- /dev/null +++ b/pos_restaurant_web_menu/controllers/pos_restaurant_web_menu.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 base64 +from odoo import http, modules +from odoo.http import request +from odoo.tools import file_open + + +class PosRestaurantWebMenu(http.Controller): + """ This is the controller for the POS Web Menu App + There is one main route that the user will use to access the + POS Web menu: /menu""" + + @http.route("/menu/", auth="public", website=True, sitemap=True) + def pos_web_menu_start(self, config_id=None): + """This route will render the LANDING PAGE of the POS Web App + And it will pass the needed data to the template: the list of products + by category, pos_config_id, table_id, session info... + After that the user will be able to navigate to products and cart + pages to the server, using client side routing.""" + pos_config_sudo = request.env["pos.config"].sudo().browse( + int(config_id)) + current_session = pos_config_sudo.current_session_id + pos_floor = pos_config_sudo.mapped('floor_ids') + table = {} + for floor in pos_floor: + table[floor.name] = request.env['restaurant.table'].sudo().search( + [('floor_id', '=', floor.id)]) + image_path = modules.get_module_resource( + "pos_restaurant_web_menu", "static/src/img", + "default_background.jpg") + bg_image = base64.b64encode(file_open(image_path, "rb").read()) + products = request.env["product.product"].sudo().search( + [('available_in_pos', '=', 'True')]) + customers = request.env["res.partner"].search([]) + pos_category = products.mapped('pos_categ_id.name') + pos_category.sort() + currency = request.env.company.currency_id.symbol + data = {category: products.filtered( + lambda pos: pos.pos_categ_id.name == category) for category in + pos_category} + return request.render( + 'pos_restaurant_web_menu.pos_restaurant_menu_index', + {'page_background': bg_image, 'table': table, 'data': data, + 'config_id': config_id, 'session_info': current_session, + 'customers': customers, 'currency': currency}) + + @http.route("/product/pos_cart", type='json', auth='public') + def pos_web_cart(self, product_id): + """ Get information about the product for pos web cart. + :param int product_id: The ID of the product. + :return dict: A dictionary containing product information.""" + product = request.env['product.product'].sudo().browse( + int(product_id)) + currency = request.env.company.currency_id.symbol + return {'id': product_id, 'display_name': product.display_name, + 'lst_price': product.lst_price, 'currency': currency} diff --git a/pos_restaurant_web_menu/doc/RELEASE_NOTES.md b/pos_restaurant_web_menu/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..9cb36bcaf --- /dev/null +++ b/pos_restaurant_web_menu/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 11.06.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for POS Restaurant Web Menu diff --git a/pos_restaurant_web_menu/models/__init__.py b/pos_restaurant_web_menu/models/__init__.py new file mode 100644 index 000000000..65e3a16ed --- /dev/null +++ b/pos_restaurant_web_menu/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 res_config_settings diff --git a/pos_restaurant_web_menu/models/pos_config.py b/pos_restaurant_web_menu/models/pos_config.py new file mode 100644 index 000000000..b1ebec371 --- /dev/null +++ b/pos_restaurant_web_menu/models/pos_config.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 typing import Optional +from odoo import Command, fields, models, _ +from odoo.exceptions import UserError + + +class PosConfig(models.Model): + """Inherit pos configuration and add new fields.""" + _inherit = 'pos.config' + + web_menu_view_mode = fields.Boolean( + string="POS web Menu", + help="Allow customers to view the menu on their phones.") + web_qr_code = fields.Binary( + string='QRcode', + help='Qr code of POS App that allows customers to view the menu on ' + 'their smartphone.') + + def _get_web_menu_route(self, table_id: Optional[int] = None) -> str: + """Return url for pos web menu with pos config_id and table_id.""" + self.ensure_one() + base_route = f"/menu/{self.id}" + table_route = "" + table = self.env["restaurant.table"].search( + [("active", "=", True), ("id", "=", table_id)], limit=1) + if table: + table_route = f"&table_identifier={table.identifier}" + return f"{base_route}?{table_route}" + + def preview_pos_web_menu_url(self): + """Return Url action for the pos web menu on clicking the menu item on + dashboard.""" + self.ensure_one() + # Raise user error if session not opened yet + if not self.current_session_id: + raise UserError( + _('The restaurant is closed. You cannot browse the menu')) + return {"type": "ir.actions.act_url", + "url": self._get_web_menu_route(), + "target": "new"} + + def _generate_unique_id(self, pos_session_id: int, table_id: int, + item_number: int) -> str: + """A unique pos reference will be generated.""" + first_part = f"{int(pos_session_id):05d}" + second_part = f"{int(table_id):03d}" + third_part = f"{int(item_number):04d}" + return f"Web-Order {first_part}-{second_part}-{third_part}" + + def create_order_from_web(self, cart_item, table, customer): + """Pos order created + :param dict cart_item: items added to pos web cart; + :param int table: id of selected table from pos cart; + :param int customer: id of selected customer; + """ + session_id = self.current_session_id + pos_order = self.env['pos.order'].sudo().search( + [('user_id', '=', self.env.user.id), ('state', '=', 'draft'), + ('table_id', '=', int(table))], limit=1) + total = sum(item['lst_price'] for item in cart_item) + unique_id = self._generate_unique_id(session_id.id, table, + len(cart_item)) + # if there is no existing order in draft stage of pos order new + # order will be created. Otherwise, product will be added to existing order. + if not pos_order: + order_item = { + 'session_id': session_id.id, + 'pos_reference': unique_id, + 'table_id': int(table), + 'partner_id': int(customer), + 'amount_total': total, + 'amount_tax': 0.0, + 'amount_paid': 0.0, + 'amount_return': 0.0} + pos_order = self.env['pos.order'].create(order_item) + for item in cart_item: + if pos_order.partner_id.id != int(customer): + return "False" + line_product = pos_order.lines.filtered( + lambda p: p.full_product_name == item['display_name']) + if not line_product: + total += item['lst_price'] + pos_lines = {'full_product_name': item['display_name'], + 'product_id': int(item['id']), + 'customer_note': item['cust_note'], + 'price_unit': item['lst_price'], + 'price_subtotal': item['lst_price'], + 'price_subtotal_incl': item['lst_price'], + 'total_cost': 50} + pos_order.write({'lines': [Command.create(pos_lines), ]}) + quantity = line_product.qty + line_product.write({'qty': quantity + 1}) diff --git a/pos_restaurant_web_menu/models/res_config_settings.py b/pos_restaurant_web_menu/models/res_config_settings.py new file mode 100644 index 000000000..961691660 --- /dev/null +++ b/pos_restaurant_web_menu/models/res_config_settings.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 io import BytesIO +from odoo import fields, models, _ +from odoo.exceptions import UserError +try: + import qrcode +except ImportError: + qrcode = None +try: + import base64 +except ImportError: + base64 = None + + +class ResConfigSettings(models.TransientModel): + """Add new fields to configuration settings for viewing web menu for + pos restaurant.""" + _inherit = 'res.config.settings' + + pos_restaurant_web_menu_view_mode = fields.Boolean( + string="Pos Web Menu", + help="Allow customers to view the menu on their phones.", + related='pos_config_id.web_menu_view_mode', readonly=False) + pos_web_qr_code = fields.Binary( + string='QR code', related='pos_config_id.web_qr_code', readonly=False, + help='Qr code of POS App that allows customers to view the menu on ' + 'their smartphone.') + + def generate_table_qr_code(self): + """Generate qr code on pos order having details of order in + current session""" + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + session_id = self.pos_config_id.current_session_id.id + if qrcode and base64 and session_id: + qr = qrcode.QRCode( + version=3, + error_correction=qrcode.constants.ERROR_CORRECT_L, + box_size=4, + border=4, ) + qr.add_data(base_url + self.pos_config_id._get_web_menu_route()) + qr.make(fit=True) + img = qr.make_image() + temp = BytesIO() + img.save(temp, format="PNG") + qr_image = base64.b64encode(temp.getvalue()) + self.write({'pos_web_qr_code': qr_image}) + else: + raise UserError( + _('Necessary Requirements To Run This Operation Is Not ' + 'Satisfied.Please open new session.')) + data = {'image': self.pos_web_qr_code, + 'company': self.env.company.name} + report_action = self.env.ref( + 'pos_restaurant_web_menu.' + 'pos_restaurant_web_menu_qr_code').report_action(self, data=data) + return report_action diff --git a/pos_restaurant_web_menu/report/pos_restaurant_web_menu_report_templates.xml b/pos_restaurant_web_menu/report/pos_restaurant_web_menu_report_templates.xml new file mode 100644 index 000000000..5c677ce08 --- /dev/null +++ b/pos_restaurant_web_menu/report/pos_restaurant_web_menu_report_templates.xml @@ -0,0 +1,20 @@ + + + + + diff --git a/pos_restaurant_web_menu/report/pos_restaurant_web_menu_reports.xml b/pos_restaurant_web_menu/report/pos_restaurant_web_menu_reports.xml new file mode 100644 index 000000000..72ad17817 --- /dev/null +++ b/pos_restaurant_web_menu/report/pos_restaurant_web_menu_reports.xml @@ -0,0 +1,14 @@ + + + + + qr.codes + pos.config + qweb-pdf + pos_restaurant_web_menu.pos_restaurant_web_menu_qr_report_template + pos_restaurant_web_menu.pos_restaurant_web_menu_qr_report_template + "QR codes" + + report + + diff --git a/pos_restaurant_web_menu/static/description/assets/icons/check.png b/pos_restaurant_web_menu/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/check.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/chevron.png b/pos_restaurant_web_menu/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/chevron.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/cogs.png b/pos_restaurant_web_menu/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/cogs.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/consultation.png b/pos_restaurant_web_menu/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/consultation.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/ecom-black.png b/pos_restaurant_web_menu/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/ecom-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/education-black.png b/pos_restaurant_web_menu/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/education-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/hotel-black.png b/pos_restaurant_web_menu/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/hotel-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/license.png b/pos_restaurant_web_menu/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/license.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/lifebuoy.png b/pos_restaurant_web_menu/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/manufacturing-black.png b/pos_restaurant_web_menu/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/pos-black.png b/pos_restaurant_web_menu/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/pos-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/puzzle.png b/pos_restaurant_web_menu/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/puzzle.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/restaurant-black.png b/pos_restaurant_web_menu/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/service-black.png b/pos_restaurant_web_menu/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/service-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/trading-black.png b/pos_restaurant_web_menu/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/trading-black.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/training.png b/pos_restaurant_web_menu/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/training.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/update.png b/pos_restaurant_web_menu/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/update.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/user.png b/pos_restaurant_web_menu/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/user.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/icons/wrench.png b/pos_restaurant_web_menu/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/icons/wrench.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/categories.png b/pos_restaurant_web_menu/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/categories.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/check-box.png b/pos_restaurant_web_menu/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/check-box.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/compass.png b/pos_restaurant_web_menu/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/compass.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/corporate.png b/pos_restaurant_web_menu/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/corporate.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/customer-support.png b/pos_restaurant_web_menu/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/customer-support.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/cybrosys-logo.png b/pos_restaurant_web_menu/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/features.png b/pos_restaurant_web_menu/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/features.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/logo.png b/pos_restaurant_web_menu/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/logo.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/pictures.png b/pos_restaurant_web_menu/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/pictures.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/pie-chart.png b/pos_restaurant_web_menu/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/pie-chart.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/right-arrow.png b/pos_restaurant_web_menu/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/right-arrow.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/star.png b/pos_restaurant_web_menu/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/star.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/support.png b/pos_restaurant_web_menu/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/support.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/misc/whatsapp.png b/pos_restaurant_web_menu/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/misc/whatsapp.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/modules/1.png b/pos_restaurant_web_menu/static/description/assets/modules/1.png new file mode 100644 index 000000000..17c14989e Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/modules/1.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/modules/2.png b/pos_restaurant_web_menu/static/description/assets/modules/2.png new file mode 100644 index 000000000..5ecc4d883 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/modules/2.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/modules/3.png b/pos_restaurant_web_menu/static/description/assets/modules/3.png new file mode 100644 index 000000000..55fb7ba18 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/modules/3.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/modules/4.png b/pos_restaurant_web_menu/static/description/assets/modules/4.png new file mode 100644 index 000000000..a586ef1bb Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/modules/4.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/modules/5.png b/pos_restaurant_web_menu/static/description/assets/modules/5.png new file mode 100644 index 000000000..e64a5b55c Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/modules/5.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/modules/6.png b/pos_restaurant_web_menu/static/description/assets/modules/6.png new file mode 100644 index 000000000..8fefb76d4 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/modules/6.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/hero.gif b/pos_restaurant_web_menu/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..1bb08cacf Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/hero.gif differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu1.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu1.png new file mode 100644 index 000000000..26acce5a8 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu1.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu10.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu10.png new file mode 100644 index 000000000..84fdcaa80 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu10.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu11.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu11.png new file mode 100644 index 000000000..503e33a40 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu11.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu2.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu2.png new file mode 100644 index 000000000..4f336fce1 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu2.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu3.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu3.png new file mode 100644 index 000000000..be1eb9b1e Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu3.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu4.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu4.png new file mode 100644 index 000000000..bac2039b1 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu4.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu5.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu5.png new file mode 100644 index 000000000..de309a1c9 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu5.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu6.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu6.png new file mode 100644 index 000000000..d660a9e79 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu6.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu7.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu7.png new file mode 100644 index 000000000..a7ee5c1db Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu7.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu8.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu8.png new file mode 100644 index 000000000..33de77c63 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu8.png differ diff --git a/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu9.png b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu9.png new file mode 100644 index 000000000..a4ebcb696 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/assets/screenshots/pos_web_menu9.png differ diff --git a/pos_restaurant_web_menu/static/description/banner.jpg b/pos_restaurant_web_menu/static/description/banner.jpg new file mode 100644 index 000000000..a0d06e682 Binary files /dev/null and b/pos_restaurant_web_menu/static/description/banner.jpg differ diff --git a/pos_restaurant_web_menu/static/description/icon.png b/pos_restaurant_web_menu/static/description/icon.png new file mode 100644 index 000000000..5ace8f6ea Binary files /dev/null and b/pos_restaurant_web_menu/static/description/icon.png differ diff --git a/pos_restaurant_web_menu/static/description/index.html b/pos_restaurant_web_menu/static/description/index.html new file mode 100644 index 000000000..b8d1155e3 --- /dev/null +++ b/pos_restaurant_web_menu/static/description/index.html @@ -0,0 +1,664 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Pos Restaurant Web Menu

+

+ This Module Create Pos Restaurant Website Menu For + Restaurant And Create New Order From Website And Generate Qr Code Of + POS App That Allows Customers To View The Menu On Their + Smartphone

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This Module Create Pos Web Menu for Restaurant And + Create New Order From Web +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Configure the menu from pos dashboard for restaurant. +
+
+ + Show Prices And Image Of Menu Products. +
+
+ + Can Add Products To Pos Cart And View them. From The Cart Can Place The Order by Selecting Table. +
+
+
+ + If a Table Already has an Order, the Product Will be Added to the Existing Order. +
+
+
+ + Available in Odoo 16.0 Community and Enterprise Edition. +
+
+ + Can Generate QR code that Allow Customer to View the Menu on their Phone. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Pos Configuration settings +

+

+ Go to Point of sale -> configuration(bar/Restaurant) + -> Enable Pos Web Menu + Then back to POS Dashboard Can see new Menu item 'Mobile + Menu'.

+
+

+ On click 'Mobile Menu' will Redirect to + New Page Pos Restaurant Web Menu.

+ +
+
+

+ Pos Restaurant Web Menu +

+

+ From the New Page Able to See all Category wise Products + Available in POS with Sale Price. + From the Cart we can Select the Table and Place the Order for + the Product. Corresponding Order will be Created.
+

+ + +

+ Mobile View for pos Restaurant Web Menu is Available.

+ +

+ Can Add Needed Product to Cart + and View the Cart. Choose Table and Customer. Click 'Order'.

+ +
+
+

+ Order Will Be Created. +

+
+ + + +
+
+

+ Generate QR Code For Orders +

+

+ Go to Point of Sale -> Configuration(bar/Restaurant) + -> Click Button Generate Qr code.
Qr code will be Generated + And on Scanning Customer Can View Menu on Their Phone. +

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

+ 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 8606827707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/pos_restaurant_web_menu/static/src/css/pos_restaurant_web_menu.css b/pos_restaurant_web_menu/static/src/css/pos_restaurant_web_menu.css new file mode 100644 index 000000000..486ca2f82 --- /dev/null +++ b/pos_restaurant_web_menu/static/src/css/pos_restaurant_web_menu.css @@ -0,0 +1,34 @@ +#pos_product_card { + cursor: pointer; + gap:10px; + padding:10px; + display:flex; + width: 250px; + margin-left: 50px; + margin-top: 25px; + background-color: darkgray; +} +.add_to_cart_pos{ + position: absolute; + right: 0; + bottom: 5px; + left: 160px; +} +#order_details{ + display: flex; + justify-content: start; + align-items: center; + margin-bottom: 20px; + margin-left: 16px; +} + +#tables_id{ + margin-left: 26px; + margin-bottom: 10px; +} +@media screen and (max-width: 600px) { + #pos_product_card { + width: 100%; + display: block; + margin-bottom: 20px; + } diff --git a/pos_restaurant_web_menu/static/src/img/default_background.jpg b/pos_restaurant_web_menu/static/src/img/default_background.jpg new file mode 100644 index 000000000..02ad79405 Binary files /dev/null and b/pos_restaurant_web_menu/static/src/img/default_background.jpg differ diff --git a/pos_restaurant_web_menu/static/src/js/pos_restaurant_web_menu.js b/pos_restaurant_web_menu/static/src/js/pos_restaurant_web_menu.js new file mode 100644 index 000000000..5e143d40e --- /dev/null +++ b/pos_restaurant_web_menu/static/src/js/pos_restaurant_web_menu.js @@ -0,0 +1,90 @@ +odoo.define('pos_restaurant_web_menu.web_menu', function (require) { +"use strict"; + /** + * The purpose of this module is to add the PosRestaurantWebMenu in the public + widget registries. + */ + var PublicWidget = require('web.public.widget'); + var rpc = require('web.rpc'); + var core = require('web.core'); + var qweb = core.qweb; + var count=0; + var cart_item = []; + var PosWebMenu = PublicWidget.Widget.extend({ + selector:'.pos_web_menu_container', + events: { + 'click .view_product_list': '_view_product_page', + 'click .add_to_cart_pos': '_onClick', + 'click .o_pos_web_menu_button': '_view_cart', + 'click .pos_web_order': '_make_an_order', + 'click .button_back': 'back' + }, + // Back button for pos web menu + back: function(ev){ + this.$el.find('.pos_web_main').show() + this.$el.find('.pos_web_cart').show() + }, + // Clicked Product will be added to the cart as table + _onClick: function (ev) { + var id = this.$(ev.currentTarget).attr("data-value"); + var self = this; + var product_id = parseInt(id) + var amount = 0 + rpc.query({ + route: '/product/pos_cart', + params: { + product_id: parseInt(product_id) + }, + }).then(function (data) { + amount = data['lst_price'] + cart_item.push(data) + self.$el.find("tbody").append(""+data['display_name']+""+data['currency']+ amount+""); + }); + self.$el.find(".cart_products").text((cart_item.length+1)); + }, + // view cart for POS + _view_cart: function (ev){ + this.$el.find(".pos_web_main").hide() + this.$el.find(".pos_web_cart").show() + }, + // Create an order or add product to existing order in drafted state if exists + _make_an_order: function (ev) { + var inputs, index, note=[]; + var self = this; + var config_id = this.$('.o_pos_web_menu_button').attr("data-value") + var table = this.$('#tables_id').val() + var customer = this.$('#customer_id').val() + inputs = document.getElementsByTagName('input'); + for (index = 0; index < inputs.length; ++index) { + // deal with inputs[index] element. + note.push(inputs[index].value) + } + // Internal note added to cart_item array + $.each(cart_item, function(index, obj) { + obj.cust_note = note[index]; + }); + // Call a method in pos_config to create order + rpc.query({ + model: 'pos.config', + method: 'create_order_from_web', + args:[parseInt(config_id),cart_item,parseInt(table),parseInt(customer)] + }).then(function(data){ + if(data === "False") { + self.$el.find("#alert").show() + self.$el.find("#alert").text("Order already exists for this table. Please select a different table or try again later.") + } + else{ + location.reload(); + } + }); + }, + // To view Product list on clicking view menu on landing page of pos web menu + _view_product_page: function(ev){ + this.$el.find(".pos_web_front_page").hide(); + this.$el.find(".pos_web_product_page").show(); + }, + }); + PublicWidget.registry.PosWebMenu = PosWebMenu; + return PosWebMenu; +}); + diff --git a/pos_restaurant_web_menu/views/pos_config_views.xml b/pos_restaurant_web_menu/views/pos_config_views.xml new file mode 100644 index 000000000..66bdd7623 --- /dev/null +++ b/pos_restaurant_web_menu/views/pos_config_views.xml @@ -0,0 +1,30 @@ + + + + + pos.config.view.kanban.inherit.pos.web.menu + pos.config + + + + +
+ Mobile Menu Enabled +
+
+ + + + + +
+
+
diff --git a/pos_restaurant_web_menu/views/pos_restaurant_web_menu_templates.xml b/pos_restaurant_web_menu/views/pos_restaurant_web_menu_templates.xml new file mode 100644 index 000000000..ad4180d56 --- /dev/null +++ b/pos_restaurant_web_menu/views/pos_restaurant_web_menu_templates.xml @@ -0,0 +1,177 @@ + + + + + diff --git a/pos_restaurant_web_menu/views/res_config_settings_views.xml b/pos_restaurant_web_menu/views/res_config_settings_views.xml new file mode 100644 index 000000000..8c0981409 --- /dev/null +++ b/pos_restaurant_web_menu/views/res_config_settings_views.xml @@ -0,0 +1,42 @@ + + + + + res.config.settings.view.form.inherit.pos.web.menu + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+