diff --git a/pos_products_based_on_time/README.rst b/pos_products_based_on_time/README.rst new file mode 100755 index 000000000..6f6f61ce1 --- /dev/null +++ b/pos_products_based_on_time/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/licenses-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +PoS Happy Hours | PoS Time Based Products | PoS Breakfast Lunch Dinner +====================================================================== +This module enables you to display time-based products in POS. The item will vary as time goes on. + +Configuration +============= +The user should be added to the security group: Administrator(Point of sale) inorder to get access to the new menu. + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V17)Vishnu KP, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/pos_products_based_on_time/__init__.py b/pos_products_based_on_time/__init__.py new file mode 100644 index 000000000..c7d7edd74 --- /dev/null +++ b/pos_products_based_on_time/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models diff --git a/pos_products_based_on_time/__manifest__.py b/pos_products_based_on_time/__manifest__.py new file mode 100644 index 000000000..9cf201819 --- /dev/null +++ b/pos_products_based_on_time/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'PoS Happy Hours | PoS Time Based Products | PoS Breakfast Lunch Dinner', + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """This module enables you to display time-based products in POS. + The item will vary as time goes on""", + 'description': """With the help of this module, you can display time-based + products in POS. With time, the item will change. The product can be + mentioned by the user in the pos configuration. The user can specify + the product there""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'point_of_sale', 'mail'], + 'data': [ + 'security/ir.model.access.csv', + 'security/security_rule.xml', + 'views/meals_planning_menu.xml' + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'pos_products_based_on_time/static/src/js/pos_planning.js', + 'pos_products_based_on_time/static/src/js/pos_model_load.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_products_based_on_time/doc/RELEASE_NOTES.md b/pos_products_based_on_time/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..50de1631d --- /dev/null +++ b/pos_products_based_on_time/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 01.02.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for PoS Happy Hours | PoS Time Based Products | PoS Breakfast Lunch Dinner diff --git a/pos_products_based_on_time/models/__init__.py b/pos_products_based_on_time/models/__init__.py new file mode 100644 index 000000000..cb3612785 --- /dev/null +++ b/pos_products_based_on_time/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import meals_planning +from . import pos_session diff --git a/pos_products_based_on_time/models/meals_planning.py b/pos_products_based_on_time/models/meals_planning.py new file mode 100644 index 000000000..074d8ad9c --- /dev/null +++ b/pos_products_based_on_time/models/meals_planning.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, fields, models +from odoo.exceptions import ValidationError + + +class MealsPlanning(models.Model): + """By using this model user can specify the time range and pos session""" + _name = 'meals.planning' + _description = "Product Planning" + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(string='Name', required=True, + help='Name for Product Planning', copy=False) + pos_ids = fields.Many2many('pos.session', string='Shops', + copy=False, help='Choose PoS Sessions', + required=True) + time_from = fields.Float(string='From', required=True, + help='Add from time(24hr)') + time_to = fields.Float(string='To', required=True, help='Add to time(24hr)') + menu_product_ids = fields.Many2many('product.product', + string='Product', + domain=[('available_in_pos', '=', True)]) + + state = fields.Selection([('activated', 'Activated'), + ('deactivated', 'Deactivated')], + default='deactivated') + company_id = fields.Many2one('res.company', string='Company', + default=lambda self: self.env.company) + + @api.constrains('time_from', 'time_to') + def _check_time_range(self): + """Validation for from time and to time""" + if self.time_from >= self.time_to: + raise ValidationError('From time must be less than to time!') + elif self.time_from > 24.0 or self.time_to > 24.0: + raise ValidationError( + 'Time value greater than 24 is not valid!') + + def action_activate_meals_plan(self): + """Change state to activate""" + self.write({ + 'state': 'activated'}) + + def action_deactivate_meals_plan(self): + """Change state to deactivate""" + self.write({ + 'state': 'deactivated'}) + + diff --git a/pos_products_based_on_time/models/pos_session.py b/pos_products_based_on_time/models/pos_session.py new file mode 100644 index 000000000..6a6c1724a --- /dev/null +++ b/pos_products_based_on_time/models/pos_session.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import models + + +class InheritPosSession(models.Model): + """Inherit pos session for load models in pos""" + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """Load Meals Planning and Menu.Meals model in pos.""" + result = super()._pos_ui_models_to_load() + new_model = 'meals.planning' + if new_model not in result: + result.append(new_model) + return result + + def _loader_params_meals_planning(self): + """Returning corresponding data to pos""" + plans = self.env['meals.planning'].search([ + ('state', '=', 'activated'), + ('pos_ids', 'in', self.id)]) + data = plans.mapped('id') + return { + 'search_params': { + 'domain': [('id', '=', data)], + 'fields': ['name', 'menu_product_ids', 'time_from', 'time_to', + 'state', 'pos_ids']}} + + def _loader_params_product_product(self): + """Load product.product parameters""" + result = super()._loader_params_product_product() + result['search_params']['fields'].extend(['name', 'id']) + return result + + def _get_pos_ui_meals_planning(self, params): + return self.env['meals.planning'].search_read(**params['search_params']) diff --git a/pos_products_based_on_time/security/ir.model.access.csv b/pos_products_based_on_time/security/ir.model.access.csv new file mode 100644 index 000000000..acb7ba47a --- /dev/null +++ b/pos_products_based_on_time/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_meals_planning_user,meals.planning.user,model_meals_planning,point_of_sale.group_pos_user,1,0,0,0 +access_meals_planning_manager,meals.planning.manager,model_meals_planning,point_of_sale.group_pos_manager,1,1,1,1 diff --git a/pos_products_based_on_time/security/security_rule.xml b/pos_products_based_on_time/security/security_rule.xml new file mode 100644 index 000000000..683b517d9 --- /dev/null +++ b/pos_products_based_on_time/security/security_rule.xml @@ -0,0 +1,8 @@ + + + + multi company access for meals planning + + ['|',('company_id','=',False),('company_id', 'in', company_ids)] + + \ No newline at end of file diff --git a/pos_products_based_on_time/static/description/assets/icons/check.png b/pos_products_based_on_time/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/check.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/chevron.png b/pos_products_based_on_time/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/chevron.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/cogs.png b/pos_products_based_on_time/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/cogs.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/consultation.png b/pos_products_based_on_time/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/consultation.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/ecom-black.png b/pos_products_based_on_time/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/ecom-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/education-black.png b/pos_products_based_on_time/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/education-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/hotel-black.png b/pos_products_based_on_time/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/hotel-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/license.png b/pos_products_based_on_time/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/license.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/lifebuoy.png b/pos_products_based_on_time/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/manufacturing-black.png b/pos_products_based_on_time/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/pos-black.png b/pos_products_based_on_time/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/pos-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/puzzle.png b/pos_products_based_on_time/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/puzzle.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/restaurant-black.png b/pos_products_based_on_time/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/service-black.png b/pos_products_based_on_time/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/service-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/trading-black.png b/pos_products_based_on_time/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/trading-black.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/training.png b/pos_products_based_on_time/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/training.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/update.png b/pos_products_based_on_time/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/update.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/user.png b/pos_products_based_on_time/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/user.png differ diff --git a/pos_products_based_on_time/static/description/assets/icons/wrench.png b/pos_products_based_on_time/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/icons/wrench.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/Cybrosys R.png b/pos_products_based_on_time/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/Cybrosys R.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/categories.png b/pos_products_based_on_time/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/categories.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/check-box.png b/pos_products_based_on_time/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/check-box.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/compass.png b/pos_products_based_on_time/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/compass.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/corporate.png b/pos_products_based_on_time/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/corporate.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/customer-support.png b/pos_products_based_on_time/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/customer-support.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/cybrosys-logo.png b/pos_products_based_on_time/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/email.svg b/pos_products_based_on_time/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_products_based_on_time/static/description/assets/misc/features.png b/pos_products_based_on_time/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/features.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/logo.png b/pos_products_based_on_time/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/logo.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/phone.svg b/pos_products_based_on_time/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/pos_products_based_on_time/static/description/assets/misc/pictures.png b/pos_products_based_on_time/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/pictures.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/pie-chart.png b/pos_products_based_on_time/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/pie-chart.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/right-arrow.png b/pos_products_based_on_time/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/right-arrow.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/star (1) 2.svg b/pos_products_based_on_time/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_products_based_on_time/static/description/assets/misc/star.png b/pos_products_based_on_time/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/star.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/support (1) 1.svg b/pos_products_based_on_time/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_products_based_on_time/static/description/assets/misc/support-email.svg b/pos_products_based_on_time/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pos_products_based_on_time/static/description/assets/misc/support.png b/pos_products_based_on_time/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/support.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/tick-mark.svg b/pos_products_based_on_time/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/pos_products_based_on_time/static/description/assets/misc/whatsapp 1.svg b/pos_products_based_on_time/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_products_based_on_time/static/description/assets/misc/whatsapp.png b/pos_products_based_on_time/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/misc/whatsapp.png differ diff --git a/pos_products_based_on_time/static/description/assets/misc/whatsapp.svg b/pos_products_based_on_time/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/pos_products_based_on_time/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_products_based_on_time/static/description/assets/modules/1.jpg b/pos_products_based_on_time/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/modules/1.jpg differ diff --git a/pos_products_based_on_time/static/description/assets/modules/2.jpg b/pos_products_based_on_time/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..87c2bb2ba Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/modules/2.jpg differ diff --git a/pos_products_based_on_time/static/description/assets/modules/3.png b/pos_products_based_on_time/static/description/assets/modules/3.png new file mode 100644 index 000000000..a5299d338 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/modules/3.png differ diff --git a/pos_products_based_on_time/static/description/assets/modules/4.png b/pos_products_based_on_time/static/description/assets/modules/4.png new file mode 100644 index 000000000..a0ac2d840 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/modules/4.png differ diff --git a/pos_products_based_on_time/static/description/assets/modules/5.jpg b/pos_products_based_on_time/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..6a102f103 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/modules/5.jpg differ diff --git a/pos_products_based_on_time/static/description/assets/modules/6.jpg b/pos_products_based_on_time/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..eaf13fef5 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/modules/6.jpg differ diff --git a/pos_products_based_on_time/static/description/assets/screenshots/1.png b/pos_products_based_on_time/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..7bd3e8df6 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/screenshots/1.png differ diff --git a/pos_products_based_on_time/static/description/assets/screenshots/2.png b/pos_products_based_on_time/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..99ac1e825 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/screenshots/2.png differ diff --git a/pos_products_based_on_time/static/description/assets/screenshots/3.png b/pos_products_based_on_time/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..a3ca50191 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/screenshots/3.png differ diff --git a/pos_products_based_on_time/static/description/assets/screenshots/4.png b/pos_products_based_on_time/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..0edaa435f Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/screenshots/4.png differ diff --git a/pos_products_based_on_time/static/description/assets/screenshots/hero.gif b/pos_products_based_on_time/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..20b3b5e94 Binary files /dev/null and b/pos_products_based_on_time/static/description/assets/screenshots/hero.gif differ diff --git a/pos_products_based_on_time/static/description/banner.jpg b/pos_products_based_on_time/static/description/banner.jpg new file mode 100644 index 000000000..6133a1dd5 Binary files /dev/null and b/pos_products_based_on_time/static/description/banner.jpg differ diff --git a/pos_products_based_on_time/static/description/icon.png b/pos_products_based_on_time/static/description/icon.png new file mode 100644 index 000000000..e55a519fd Binary files /dev/null and b/pos_products_based_on_time/static/description/icon.png differ diff --git a/pos_products_based_on_time/static/description/index.html b/pos_products_based_on_time/static/description/index.html new file mode 100644 index 000000000..dd260baa6 --- /dev/null +++ b/pos_products_based_on_time/static/description/index.html @@ -0,0 +1,678 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ PoS Happy Hours | PoS Time Based Products | PoS Breakfast Lunch Dinner

+

+ This module enables you to display time-based products in POS. The item will vary as time goes on. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

+ Odoo 17 Community & Enterprise Edition + Support.

+

PoS Time Based Products in Odoo 17 Community Enterprise Edition + Support. +

+
+
+
+
+
+
+ +
+
+

+ Time based Product Availability

+

The pos product will change in accordance with the time. +

+
+
+
+
+
+
+ +
+
+

+ Automated Product Change

+

Changing the product without ending the session or refreshing

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

+ Product Planning

+
+ There will be a menu under product menu to configure the feature. +
+
+
+
+
+
+
+ +
+
+

+ Product planning form page

+
+ Configure the form page with product and time.
+
+
+
+
+
+
+ +
+
+

+ Before the Time interval

+
+ After Enable the condition under the planning, you can see the product before the time interval
+
+
+
+
+
+
+ +
+
+

+ Filtered Product list

+
+ Now, between the time interval you can only see the selected product in the pos
+
+
+
+
+
+
+
    +
  • + >The pos product will change in accordance with the time. +
  • +
  • + Changing the product without ending the session or refreshing. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:04 Jan 2024 +
+

+ Odoo 17 PoS Happy Hours | PoS Time Based Products | PoS Breakfast Lunch Dinner.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/pos_products_based_on_time/static/src/js/pos_model_load.js b/pos_products_based_on_time/static/src/js/pos_model_load.js new file mode 100644 index 000000000..59ee12d0f --- /dev/null +++ b/pos_products_based_on_time/static/src/js/pos_model_load.js @@ -0,0 +1,23 @@ +/** @odoo-module */ + +import { patch } from "@web/core/utils/patch"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; + +patch(PosStore.prototype, { + async setup() { + await super.setup(...arguments);}, + /** + * Override the _processData method to preprocess the meals planning data + * before it is saved to the global state. + * @param {Object} loadedData - The data loaded from the backend. + */ + async _processData(loadedData) { + await super._processData(...arguments); + let new_meal = [] + loadedData['meals.planning'].forEach((data) => { + data.menu_product_ids = loadedData['product.product'].filter((meal) => data.menu_product_ids.includes(meal.id)) + new_meal.push(data) + }) + this.meals_planning = new_meal + }, +}); diff --git a/pos_products_based_on_time/static/src/js/pos_planning.js b/pos_products_based_on_time/static/src/js/pos_planning.js new file mode 100644 index 000000000..0de9d237b --- /dev/null +++ b/pos_products_based_on_time/static/src/js/pos_planning.js @@ -0,0 +1,41 @@ +/** @odoo-module */ + +import { patch } from "@web/core/utils/patch"; +import { ProductsWidget } from "@point_of_sale/app/screens/product_screen/product_list/product_list"; + +patch(ProductsWidget.prototype, { + /** + * Override the productsToDisplay getter method to filter the list of products + * based on the current time and the meals planning data. + * @returns {Array} A sorted array of product objects to be displayed. + */ + get productsToDisplay() { + const { db } = this.pos; + let list = []; + var res_list = new Array(); + if (this.searchWord !== '') { + list = db.search_product_in_category( + this.selectedCategoryId, + this.searchWord + ); + } else { + list = db.get_product_by_category(this.selectedCategoryId); + } + const date = new Date(); + let hoursMin = date.getHours() + '.' + date.getMinutes(); + let time = Number(hoursMin) + let data = []; + this.env.services.pos.meals_planning.forEach(object => { + if (object.time_from <= time && time < object.time_to) { + } + const plan_arr = object.menu_product_ids.flat(1); + data.push(plan_arr.map(meal => meal.id)); + }) + if (data.length) { + list = list.filter(product => data[0].includes(product.id)) + } + return list.sort(function(a, b) { + return a.display_name.localeCompare(b.display_name) + }); + } +}); diff --git a/pos_products_based_on_time/views/meals_planning_menu.xml b/pos_products_based_on_time/views/meals_planning_menu.xml new file mode 100644 index 000000000..40648e53c --- /dev/null +++ b/pos_products_based_on_time/views/meals_planning_menu.xml @@ -0,0 +1,99 @@ + + + + meals.planning + + + + + + + + + + + + + + + + meals.planning.view.tree + meals.planning + + + + + + + + + + + + meals.planning.view.form + meals.planning + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ + + Meals planning + meals.planning + tree,form + + + +