diff --git a/pos_takeaway/README.rst b/pos_takeaway/README.rst new file mode 100644 index 000000000..6c2681554 --- /dev/null +++ b/pos_takeaway/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Restaurant Dine-in/TakeAway +=============================== +* This module will add the options Dine-in and Take away in Odoo POS. +* A separate tokens will be generated for all Takeaway orders. + + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +================================================= +General Public License, version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer : (V16) Bhagyadev KP, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/pos_takeaway/__init__.py b/pos_takeaway/__init__.py new file mode 100644 index 000000000..385262f95 --- /dev/null +++ b/pos_takeaway/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import models diff --git a/pos_takeaway/__manifest__.py b/pos_takeaway/__manifest__.py new file mode 100644 index 000000000..ffb74cbbb --- /dev/null +++ b/pos_takeaway/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +{ + 'name': 'POS Restaurant Dine-in/TakeAway', + 'version': '16.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'This module will add the options Dine-in and Take away in Odoo' + ' POS.', + 'description': 'The POS user can make orders as Dine-in or Take away and it' + ' will create separate token for Take away orders.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['point_of_sale', 'pos_restaurant', 'web'], + 'data': [ + 'views/res_config_settings_views.xml', + 'views/pos_order_views.xml' + ], + 'assets': { + 'point_of_sale.assets': [ + 'pos_takeaway/static/src/js/Screens/PosGlobalState.js', + 'pos_takeaway/static/src/js/Screens/ProductScreen/ControlButtons/TakeAway.js', + 'pos_takeaway/static/src/js/Screens/PaymentScreen/PaymentScreen.js', + 'pos_takeaway/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml', + 'pos_takeaway/static/src/xml/Screens/ProductScreen/ControlButtons/TakeAway.xml', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_takeaway/doc/RELEASE_NOTES.md b/pos_takeaway/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..b151e9f82 --- /dev/null +++ b/pos_takeaway/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 05.01.2024 +#### Version 16.0.1.0.0 +##### ADD +- Initial Commit for POS Restaurant Dine-in/TakeAway diff --git a/pos_takeaway/models/__init__.py b/pos_takeaway/models/__init__.py new file mode 100644 index 000000000..1b9a13344 --- /dev/null +++ b/pos_takeaway/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P (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 res_config_settings +from . import pos_order +from . import pos_session diff --git a/pos_takeaway/models/pos_order.py b/pos_takeaway/models/pos_order.py new file mode 100644 index 000000000..03fd39e13 --- /dev/null +++ b/pos_takeaway/models/pos_order.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P (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 PosOrder(models.Model): + """Inheriting pos_order""" + _inherit = "pos.order" + + is_takeaway = fields.Boolean(string="Is a Takeaway Order", + help="Is a Takeaway Order", default=False, ) + token_number = fields.Char(string="Token Number", + help="Token number starts from 1") + + def generate_token(self, uid): + """ + This function check whether the order is a take-away order or a dine-in. + If it is a take-away order, it will create the token number for that + order and returns it. + :param : uid: the pos order id + :return : order.token_number: token number of the pos order having the + order reference uid + """ + order = self.env['pos.order'].browse(uid) + order.is_takeaway = True + if not order.token_number and \ + self.env['res.config.settings'].get_values()[ + 'generate_token']: + if self.env['res.config.settings'].get_values()[ + 'pos_token']: + order.token_number = int( + self.env['res.config.settings'].get_values()[ + 'pos_token']) + 1 + else: + order.token_number = 1 + self.env['ir.config_parameter'].sudo().set_param( + 'pos_takeaway.pos_token', + order.token_number) + return order.token_number + else: + return 0 diff --git a/pos_takeaway/models/pos_session.py b/pos_takeaway/models/pos_session.py new file mode 100644 index 000000000..211b0b66f --- /dev/null +++ b/pos_takeaway/models/pos_session.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from odoo import models + + +class PosSession(models.Model): + """Inherited POS Session""" + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """Supering the function for loading res.config.settings to pos session""" + result = super()._pos_ui_models_to_load() + result.append('res.config.settings') + return result + + def _loader_params_res_config_settings(self): + """Returning the field required""" + return { + 'search_params': { + 'fields': ['takeaway', ], + }, + } + + def _get_pos_ui_res_config_settings(self, params): + """Returns the model""" + return self.env['res.config.settings'].search_read( + **params['search_params']) diff --git a/pos_takeaway/models/res_config_settings.py b/pos_takeaway/models/res_config_settings.py new file mode 100644 index 000000000..bf8f88c74 --- /dev/null +++ b/pos_takeaway/models/res_config_settings.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Bhagyadev K P (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): + """Inheriting res_config_settings to add generate_token, pos_token and + takeaway fields""" + _inherit = 'res.config.settings' + + generate_token = fields.Boolean(string="Generate Token", + help="This will generate separate token " + "for all Take Away orders.") + pos_token = fields.Integer(string="Token", + help='The token will be start from 1.') + takeaway = fields.Boolean(string="POS Takeaways", + help="This will enable the Take Away feature on" + " POS.", + config_parameter='pos_takeaway.takeaway') + + def get_values(self): + """Getting the values""" + res = super(ResConfigSettings, self).get_values() + res.update( + generate_token = self.env['ir.config_parameter'].sudo().get_param( + 'pos_takeaway.generate_token'), + pos_token=self.env['ir.config_parameter'].sudo().get_param( + 'pos_takeaway.pos_token'), + ) + return res + + def set_values(self): + """Set the values""" + res = super(ResConfigSettings, self).set_values() + self.env['ir.config_parameter'].sudo().set_param( + 'pos_takeaway.generate_token', self.generate_token) + self.env['ir.config_parameter'].sudo().set_param( + 'pos_takeaway.pos_token', self.pos_token or 0) + return res diff --git a/pos_takeaway/static/description/assets/icons/check.png b/pos_takeaway/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/check.png differ diff --git a/pos_takeaway/static/description/assets/icons/chevron.png b/pos_takeaway/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/chevron.png differ diff --git a/pos_takeaway/static/description/assets/icons/cogs.png b/pos_takeaway/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/cogs.png differ diff --git a/pos_takeaway/static/description/assets/icons/consultation.png b/pos_takeaway/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/consultation.png differ diff --git a/pos_takeaway/static/description/assets/icons/ecom-black.png b/pos_takeaway/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/ecom-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/education-black.png b/pos_takeaway/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/education-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/hotel-black.png b/pos_takeaway/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/hotel-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/license.png b/pos_takeaway/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/license.png differ diff --git a/pos_takeaway/static/description/assets/icons/lifebuoy.png b/pos_takeaway/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_takeaway/static/description/assets/icons/manufacturing-black.png b/pos_takeaway/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/pos-black.png b/pos_takeaway/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/pos-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/puzzle.png b/pos_takeaway/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/puzzle.png differ diff --git a/pos_takeaway/static/description/assets/icons/restaurant-black.png b/pos_takeaway/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/service-black.png b/pos_takeaway/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/service-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/trading-black.png b/pos_takeaway/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/trading-black.png differ diff --git a/pos_takeaway/static/description/assets/icons/training.png b/pos_takeaway/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/training.png differ diff --git a/pos_takeaway/static/description/assets/icons/update.png b/pos_takeaway/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/update.png differ diff --git a/pos_takeaway/static/description/assets/icons/user.png b/pos_takeaway/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/user.png differ diff --git a/pos_takeaway/static/description/assets/icons/wrench.png b/pos_takeaway/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_takeaway/static/description/assets/icons/wrench.png differ diff --git a/pos_takeaway/static/description/assets/misc/categories.png b/pos_takeaway/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/categories.png differ diff --git a/pos_takeaway/static/description/assets/misc/check-box.png b/pos_takeaway/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/check-box.png differ diff --git a/pos_takeaway/static/description/assets/misc/compass.png b/pos_takeaway/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/compass.png differ diff --git a/pos_takeaway/static/description/assets/misc/corporate.png b/pos_takeaway/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/corporate.png differ diff --git a/pos_takeaway/static/description/assets/misc/customer-support.png b/pos_takeaway/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/customer-support.png differ diff --git a/pos_takeaway/static/description/assets/misc/cybrosys-logo.png b/pos_takeaway/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_takeaway/static/description/assets/misc/features.png b/pos_takeaway/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/features.png differ diff --git a/pos_takeaway/static/description/assets/misc/logo.png b/pos_takeaway/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/logo.png differ diff --git a/pos_takeaway/static/description/assets/misc/pictures.png b/pos_takeaway/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/pictures.png differ diff --git a/pos_takeaway/static/description/assets/misc/pie-chart.png b/pos_takeaway/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/pie-chart.png differ diff --git a/pos_takeaway/static/description/assets/misc/right-arrow.png b/pos_takeaway/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/right-arrow.png differ diff --git a/pos_takeaway/static/description/assets/misc/star.png b/pos_takeaway/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/star.png differ diff --git a/pos_takeaway/static/description/assets/misc/support.png b/pos_takeaway/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/support.png differ diff --git a/pos_takeaway/static/description/assets/misc/whatsapp.png b/pos_takeaway/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_takeaway/static/description/assets/misc/whatsapp.png differ diff --git a/pos_takeaway/static/description/assets/modules/l1.png b/pos_takeaway/static/description/assets/modules/l1.png new file mode 100644 index 000000000..e92318a72 Binary files /dev/null and b/pos_takeaway/static/description/assets/modules/l1.png differ diff --git a/pos_takeaway/static/description/assets/modules/l2.png b/pos_takeaway/static/description/assets/modules/l2.png new file mode 100644 index 000000000..9ac0edfdc Binary files /dev/null and b/pos_takeaway/static/description/assets/modules/l2.png differ diff --git a/pos_takeaway/static/description/assets/modules/l3.png b/pos_takeaway/static/description/assets/modules/l3.png new file mode 100644 index 000000000..d627b3329 Binary files /dev/null and b/pos_takeaway/static/description/assets/modules/l3.png differ diff --git a/pos_takeaway/static/description/assets/modules/l4.png b/pos_takeaway/static/description/assets/modules/l4.png new file mode 100644 index 000000000..339d16e3b Binary files /dev/null and b/pos_takeaway/static/description/assets/modules/l4.png differ diff --git a/pos_takeaway/static/description/assets/modules/l5.png b/pos_takeaway/static/description/assets/modules/l5.png new file mode 100644 index 000000000..202521d33 Binary files /dev/null and b/pos_takeaway/static/description/assets/modules/l5.png differ diff --git a/pos_takeaway/static/description/assets/modules/l6.png b/pos_takeaway/static/description/assets/modules/l6.png new file mode 100644 index 000000000..ed1a668fc Binary files /dev/null and b/pos_takeaway/static/description/assets/modules/l6.png differ diff --git a/pos_takeaway/static/description/assets/screenshots/hero.gif b/pos_takeaway/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..a2e2e0d79 Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/hero.gif differ diff --git a/pos_takeaway/static/description/assets/screenshots/s1.png b/pos_takeaway/static/description/assets/screenshots/s1.png new file mode 100644 index 000000000..f0143038c Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/s1.png differ diff --git a/pos_takeaway/static/description/assets/screenshots/s2.png b/pos_takeaway/static/description/assets/screenshots/s2.png new file mode 100644 index 000000000..7823497e7 Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/s2.png differ diff --git a/pos_takeaway/static/description/assets/screenshots/s3.png b/pos_takeaway/static/description/assets/screenshots/s3.png new file mode 100644 index 000000000..a212f8375 Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/s3.png differ diff --git a/pos_takeaway/static/description/assets/screenshots/s4.png b/pos_takeaway/static/description/assets/screenshots/s4.png new file mode 100644 index 000000000..5766a3898 Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/s4.png differ diff --git a/pos_takeaway/static/description/assets/screenshots/s5.png b/pos_takeaway/static/description/assets/screenshots/s5.png new file mode 100644 index 000000000..309678b51 Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/s5.png differ diff --git a/pos_takeaway/static/description/assets/screenshots/s6.png b/pos_takeaway/static/description/assets/screenshots/s6.png new file mode 100644 index 000000000..faf40d901 Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/s6.png differ diff --git a/pos_takeaway/static/description/assets/screenshots/s7.png b/pos_takeaway/static/description/assets/screenshots/s7.png new file mode 100644 index 000000000..77d6fd068 Binary files /dev/null and b/pos_takeaway/static/description/assets/screenshots/s7.png differ diff --git a/pos_takeaway/static/description/banner.png b/pos_takeaway/static/description/banner.png new file mode 100644 index 000000000..dbd280ded Binary files /dev/null and b/pos_takeaway/static/description/banner.png differ diff --git a/pos_takeaway/static/description/icon.png b/pos_takeaway/static/description/icon.png new file mode 100644 index 000000000..5bf8b601e Binary files /dev/null and b/pos_takeaway/static/description/icon.png differ diff --git a/pos_takeaway/static/description/index.html b/pos_takeaway/static/description/index.html new file mode 100644 index 000000000..7943f3e66 --- /dev/null +++ b/pos_takeaway/static/description/index.html @@ -0,0 +1,600 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + +

+ POS Restaurant Dine-in/TakeAway

+

+ This module will add the options Dine-in and Take away in Odoo POS. +

+ + +
+ +
+
+ +
+

+ Explore This Module +

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ The POS user can make orders as Dine-in or Take away, and it will create separate token for Take away orders. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + The POS user can make orders as Dine-in or Take away +
+
+ + The token number of Take Away order will be printed on the Receipt +
+
+ + Will create a separate token for each Take Away orders +
+
+
+ + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

You can enable the Take-away feature from the boolean field in POS configuration settings. Also, you can enable the feature of tokens from here.

+ +
+
+

You can create order and click on the 'Take Away' button to make the order Take Away.

+ +
+ +
+

If the order is a Take-Away one, you can see the 'Take Away' label and the Token on the receipt.

+ +
+
+

You can simply create a normal Order without clicking the 'Take Away' button, and it will be a Dine-In order.

+ +
+
+

The receipt of Dine-in orders will be labelled as 'Dine-In'.

+ +
+ +
+

You can filter the 'Dine-In' orders with the Dine-In filter available on orders.

+ +
+
+

You can filter the 'Take Away' orders with the Take-Away filter available on orders.

+ +
+
+
+ + +
+
+ +
+

+ Related + Products +

+
+
+
+

Related Modules

+

Explore our related modules

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

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

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/pos_takeaway/static/src/js/Screens/PaymentScreen/PaymentScreen.js b/pos_takeaway/static/src/js/Screens/PaymentScreen/PaymentScreen.js new file mode 100644 index 000000000..c793d55ee --- /dev/null +++ b/pos_takeaway/static/src/js/Screens/PaymentScreen/PaymentScreen.js @@ -0,0 +1,34 @@ +odoo.define("pos_takeaway.Token", function(require) { + "use strict"; + const Registries = require('point_of_sale.Registries'); + const PaymentScreen = require('point_of_sale.PaymentScreen'); + var rpc = require('web.rpc') +// extending payment screen + const TokenPaymentScreen = (PaymentScreen) => + class extends PaymentScreen { + async validateOrder(isForceValidate) { + const order = this.env.pos.get_order(); + var self = this; + var is_restaurant = self.env.pos.config.module_pos_restaurant + self.token = 0; + order.newtoken= self.token + const syncOrderResult = await this.env.pos.push_single_order(this.currentOrder); + self.is_take_way = self.env.pos.get_order().is_take_way; + self.is_restaurant = self.env.pos.config.module_pos_restaurant; + self.takeaway = self.env.pos.takeaway; + if (self.is_take_way && self.is_restaurant){ + rpc.query({ + model: 'pos.order', + method: 'generate_token', + args: [,syncOrderResult[0].id] + }).then(function (result){ + self.token = result + order.token_generated=result + }); + } + await super.validateOrder(isForceValidate); + } + }; + Registries.Component.extend(PaymentScreen, TokenPaymentScreen); + return PaymentScreen; +}); diff --git a/pos_takeaway/static/src/js/Screens/PosGlobalState.js b/pos_takeaway/static/src/js/Screens/PosGlobalState.js new file mode 100644 index 000000000..642cccad9 --- /dev/null +++ b/pos_takeaway/static/src/js/Screens/PosGlobalState.js @@ -0,0 +1,13 @@ +odoo.define('pos_takeaway.pos', function(require) { + "use strict"; + var { PosGlobalState } = require('point_of_sale.models'); + const Registries = require('point_of_sale.Registries'); +//model loading to this.res_config_settings + const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState { + async _processData(loadedData) { + await super._processData(...arguments); + this.res_config_settings = loadedData['res.config.settings']; + } + } + Registries.Model.extend(PosGlobalState, NewPosGlobalState); +}); diff --git a/pos_takeaway/static/src/js/Screens/ProductScreen/ControlButtons/TakeAway.js b/pos_takeaway/static/src/js/Screens/ProductScreen/ControlButtons/TakeAway.js new file mode 100644 index 000000000..fb7efd545 --- /dev/null +++ b/pos_takeaway/static/src/js/Screens/ProductScreen/ControlButtons/TakeAway.js @@ -0,0 +1,36 @@ +/** @odoo-module **/ +const { useListener } = require("@web/core/utils/hooks"); +const Dialog = require('web.Dialog'); +import { _t } from 'web.core'; +import PosComponent from 'point_of_sale.PosComponent'; +import Registries from 'point_of_sale.Registries'; +import ProductScreen from 'point_of_sale.ProductScreen'; +import { Gui } from 'point_of_sale.Gui'; + +// Extending the PosComponent to enable the takeaway for the order. + class SendToTakeaway extends PosComponent { + setup() { + useListener('click', this.onClick); + } + onClick() { + var selectedOrder = this.env.pos.get_order(); + selectedOrder.initialize_validation_date(); + if(selectedOrder.is_empty()){ + return alert ('Please add product!!'); + }else{ + const sendButton = document.getElementById('takeaway_button_id'); + sendButton.className = "control-button highlight"; + selectedOrder.is_take_way = true; + const takeawaySetting = this.props; + } + } + }; +SendToTakeaway.template = 'SendToTakeaway'; +ProductScreen.addControlButton({ + component: SendToTakeaway, + condition: function() { + return this.env.pos.config.module_pos_restaurant && this.env.pos.res_config_settings[this.env.pos.res_config_settings.length -1]['takeaway']; + }, +}); +Registries.Component.add(SendToTakeaway); +return SendToTakeaway; diff --git a/pos_takeaway/static/src/xml/Screens/ProductScreen/ControlButtons/TakeAway.xml b/pos_takeaway/static/src/xml/Screens/ProductScreen/ControlButtons/TakeAway.xml new file mode 100644 index 000000000..8e4c17b8e --- /dev/null +++ b/pos_takeaway/static/src/xml/Screens/ProductScreen/ControlButtons/TakeAway.xml @@ -0,0 +1,10 @@ + + + + +
+ + Take away +
+
+
diff --git a/pos_takeaway/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml b/pos_takeaway/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml new file mode 100644 index 000000000..80fbece3d --- /dev/null +++ b/pos_takeaway/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml @@ -0,0 +1,40 @@ + + + + + + + + +
--------------------------------
+
+ + Take Away + +
+
+ +
--------------------------------
+
+ + Dine-In + +
+
+ +
--------------------------------
+
+ + Token Number: + + +
+
+
+
+
+
diff --git a/pos_takeaway/views/pos_order_views.xml b/pos_takeaway/views/pos_order_views.xml new file mode 100644 index 000000000..970fdf0b9 --- /dev/null +++ b/pos_takeaway/views/pos_order_views.xml @@ -0,0 +1,17 @@ + + + + + pos.order.view.filter.inherit.pos.takeaway + pos.order + + + + + + + + + diff --git a/pos_takeaway/views/res_config_settings_views.xml b/pos_takeaway/views/res_config_settings_views.xml new file mode 100644 index 000000000..5efcf000a --- /dev/null +++ b/pos_takeaway/views/res_config_settings_views.xml @@ -0,0 +1,44 @@ + + + + + res.config.settings.view.form.inherit.pos.takeaway + res.config.settings + + + +

Other Features

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