diff --git a/pos_order_question/README.rst b/pos_order_question/README.rst new file mode 100755 index 000000000..48c879054 --- /dev/null +++ b/pos_order_question/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 Order Questions +======================= +This module will help you to add questions related to the product in the +session at time of ordering. + +Configuration +============= + - www.odoo.com/documentation/17.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developers: (V17) Nihala MK @ Cybrosys + +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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +.. image:: https://cybrosys.com/images/logo.png + :target: https://www.cybrosys.com" + +Further information +=================== +HTML Description: ``__ diff --git a/pos_order_question/__init__.py b/pos_order_question/__init__.py new file mode 100644 index 000000000..18a00a821 --- /dev/null +++ b/pos_order_question/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : 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 \ No newline at end of file diff --git a/pos_order_question/__manifest__.py b/pos_order_question/__manifest__.py new file mode 100644 index 000000000..ca1185518 --- /dev/null +++ b/pos_order_question/__manifest__.py @@ -0,0 +1,38 @@ +{ + 'name': 'POS Order Questions', + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Add questions related to the product in the session.', + 'description': "This provides an option to add questions related to the " + "product in the session at time of ordering.It will help " + "you to customize ordering in POS.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['point_of_sale', 'product'], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_template_view.xml' + ], + "assets": { + # Assets + 'point_of_sale._assets_pos': [ + 'pos_order_question/static/src/js/PosSession.js', + 'pos_order_question/static/src/js/Popups/OrderQuestionPopup.js', + 'pos_order_question/static/src/xml/Popups/OrderQuestionPopup.xml', + 'pos_order_question/static/src/js/Screens/ProductScreen/Orderline.js', + 'pos_order_question/static/src/xml/Screens/ProductScreen/Orderline.xml', + 'pos_order_question/static/src/css/Popups/OrderQuestionPopup.css', + 'pos_order_question/static/src/js/Screens/ProductScreen/pos_orderline.js' + ], + + }, + 'images': [ + 'static/description/banner.jpg', + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_order_question/doc/RELEASE_NOTES.md b/pos_order_question/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..098320251 --- /dev/null +++ b/pos_order_question/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 30.09.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for POS Order Questions diff --git a/pos_order_question/models/__init__.py b/pos_order_question/models/__init__.py new file mode 100644 index 000000000..b7a754316 --- /dev/null +++ b/pos_order_question/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_order_question +from . import product_template +from . import pos_session diff --git a/pos_order_question/models/pos_order_question.py b/pos_order_question/models/pos_order_question.py new file mode 100644 index 000000000..e33902af3 --- /dev/null +++ b/pos_order_question/models/pos_order_question.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : 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 PosOrderQuestion(models.Model): + """Class for the model pos_order_question.""" + _name = "pos.order.question" + _description = "PosOrder Question" + + name = fields.Char(string="Question", help='Questions for the products.') + product_tmpl_id = fields.Many2one('product.template', string='Product', + help='product template of the question.') + + @api.constrains('name') + def _check_name(self): + """Function to prevent saving empty questions.""" + for rec in self: + if not rec.name: + raise ValidationError( + _('Question cannot be empty.')) diff --git a/pos_order_question/models/pos_session.py b/pos_order_question/models/pos_session.py new file mode 100644 index 000000000..e70b28fd7 --- /dev/null +++ b/pos_order_question/models/pos_session.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : 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): + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + res = super()._pos_ui_models_to_load() + res.append('pos.order.question') + return res + + def _get_pos_ui_pos_order_question(self, params): + """Adding search params into pos_order_questions""" + return self.env['pos.order.question'].search_read( + **params['search_params']) + + def _loader_params_pos_order_question(self): + """Loading fields of model pos_order_question""" + return {'search_params': {'domain': [], 'fields': ['name']}} + + def _loader_params_product_product(self): + """Loading newly added field from product_product into pos_session""" + result = super()._loader_params_product_product() + result['search_params']['fields'].append('order_question_ids') + return result diff --git a/pos_order_question/models/product_template.py b/pos_order_question/models/product_template.py new file mode 100644 index 000000000..a739a7e11 --- /dev/null +++ b/pos_order_question/models/product_template.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (Contact : 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 ProductTemplate(models.Model): + """Inherited model product_template to add a new field""" + _inherit = "product.template" + + order_question_ids = fields.One2many('pos.order.question', 'product_tmpl_id', + string='Order Questions', + help="Questions of the template") diff --git a/pos_order_question/security/ir.model.access.csv b/pos_order_question/security/ir.model.access.csv new file mode 100644 index 000000000..52d6b4b14 --- /dev/null +++ b/pos_order_question/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_order_question_user,access.pos.order.question.user,model_pos_order_question,base.group_user,1,1,1,1 diff --git a/pos_order_question/static/description/assets/icons/capture (1).png b/pos_order_question/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/pos_order_question/static/description/assets/icons/capture (1).png differ diff --git a/pos_order_question/static/description/assets/icons/check.png b/pos_order_question/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_order_question/static/description/assets/icons/check.png differ diff --git a/pos_order_question/static/description/assets/icons/chevron.png b/pos_order_question/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/chevron.png differ diff --git a/pos_order_question/static/description/assets/icons/cogs.png b/pos_order_question/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/cogs.png differ diff --git a/pos_order_question/static/description/assets/icons/consultation.png b/pos_order_question/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_order_question/static/description/assets/icons/consultation.png differ diff --git a/pos_order_question/static/description/assets/icons/ecom-black.png b/pos_order_question/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/ecom-black.png differ diff --git a/pos_order_question/static/description/assets/icons/education-black.png b/pos_order_question/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_order_question/static/description/assets/icons/education-black.png differ diff --git a/pos_order_question/static/description/assets/icons/hotel-black.png b/pos_order_question/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_order_question/static/description/assets/icons/hotel-black.png differ diff --git a/pos_order_question/static/description/assets/icons/img.png b/pos_order_question/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/img.png differ diff --git a/pos_order_question/static/description/assets/icons/license.png b/pos_order_question/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_order_question/static/description/assets/icons/license.png differ diff --git a/pos_order_question/static/description/assets/icons/lifebuoy.png b/pos_order_question/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_order_question/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_order_question/static/description/assets/icons/manufacturing-black.png b/pos_order_question/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_order_question/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_order_question/static/description/assets/icons/photo-capture.png b/pos_order_question/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/photo-capture.png differ diff --git a/pos_order_question/static/description/assets/icons/pos-black.png b/pos_order_question/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/pos-black.png differ diff --git a/pos_order_question/static/description/assets/icons/puzzle.png b/pos_order_question/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/puzzle.png differ diff --git a/pos_order_question/static/description/assets/icons/restaurant-black.png b/pos_order_question/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_order_question/static/description/assets/icons/service-black.png b/pos_order_question/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_order_question/static/description/assets/icons/service-black.png differ diff --git a/pos_order_question/static/description/assets/icons/trading-black.png b/pos_order_question/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_order_question/static/description/assets/icons/trading-black.png differ diff --git a/pos_order_question/static/description/assets/icons/training.png b/pos_order_question/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_order_question/static/description/assets/icons/training.png differ diff --git a/pos_order_question/static/description/assets/icons/update.png b/pos_order_question/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_order_question/static/description/assets/icons/update.png differ diff --git a/pos_order_question/static/description/assets/icons/user.png b/pos_order_question/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_order_question/static/description/assets/icons/user.png differ diff --git a/pos_order_question/static/description/assets/icons/wrench.png b/pos_order_question/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_order_question/static/description/assets/icons/wrench.png differ diff --git a/pos_order_question/static/description/assets/misc/Cybrosys R.png b/pos_order_question/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/Cybrosys R.png differ diff --git a/pos_order_question/static/description/assets/misc/email.svg b/pos_order_question/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/pos_order_question/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_order_question/static/description/assets/misc/phone.svg b/pos_order_question/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/pos_order_question/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/pos_order_question/static/description/assets/misc/star (1) 2.svg b/pos_order_question/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/pos_order_question/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_order_question/static/description/assets/misc/support (1) 1.svg b/pos_order_question/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/pos_order_question/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_order_question/static/description/assets/misc/support-email.svg b/pos_order_question/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/pos_order_question/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pos_order_question/static/description/assets/misc/tick-mark.svg b/pos_order_question/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/pos_order_question/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/pos_order_question/static/description/assets/misc/whatsapp 1.svg b/pos_order_question/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/pos_order_question/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_order_question/static/description/assets/misc/whatsapp.svg b/pos_order_question/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/pos_order_question/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_order_question/static/description/assets/modules/1.gif b/pos_order_question/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/1.gif differ diff --git a/pos_order_question/static/description/assets/modules/1.png b/pos_order_question/static/description/assets/modules/1.png new file mode 100644 index 000000000..d0f36b007 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/1.png differ diff --git a/pos_order_question/static/description/assets/modules/2.png b/pos_order_question/static/description/assets/modules/2.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/pos_order_question/static/description/assets/modules/2.png differ diff --git a/pos_order_question/static/description/assets/modules/3.png b/pos_order_question/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/3.png differ diff --git a/pos_order_question/static/description/assets/modules/4.jpg b/pos_order_question/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/4.jpg differ diff --git a/pos_order_question/static/description/assets/modules/5.jpg b/pos_order_question/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/5.jpg differ diff --git a/pos_order_question/static/description/assets/modules/6.png b/pos_order_question/static/description/assets/modules/6.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/6.png differ diff --git a/pos_order_question/static/description/assets/modules/l2.png b/pos_order_question/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/pos_order_question/static/description/assets/modules/l2.png differ diff --git a/pos_order_question/static/description/assets/modules/l3.png b/pos_order_question/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/pos_order_question/static/description/assets/modules/l3.png differ diff --git a/pos_order_question/static/description/assets/modules/l4.png b/pos_order_question/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/l4.png differ diff --git a/pos_order_question/static/description/assets/modules/l5.png b/pos_order_question/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/l5.png differ diff --git a/pos_order_question/static/description/assets/modules/l6.png b/pos_order_question/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/pos_order_question/static/description/assets/modules/l6.png differ diff --git a/pos_order_question/static/description/assets/screenshots/Screenshot1.png b/pos_order_question/static/description/assets/screenshots/Screenshot1.png new file mode 100644 index 000000000..b9e2c1e3c Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/Screenshot1.png differ diff --git a/pos_order_question/static/description/assets/screenshots/Screenshot2.png b/pos_order_question/static/description/assets/screenshots/Screenshot2.png new file mode 100644 index 000000000..cdd3d6a69 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/Screenshot2.png differ diff --git a/pos_order_question/static/description/assets/screenshots/Screenshot4.png b/pos_order_question/static/description/assets/screenshots/Screenshot4.png new file mode 100644 index 000000000..e363dfa28 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/Screenshot4.png differ diff --git a/pos_order_question/static/description/assets/screenshots/Screenshot5.png b/pos_order_question/static/description/assets/screenshots/Screenshot5.png new file mode 100644 index 000000000..69b68e55c Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/Screenshot5.png differ diff --git a/pos_order_question/static/description/assets/screenshots/hero.gif b/pos_order_question/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..3c0c4f5a7 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/hero.gif differ diff --git a/pos_order_question/static/description/assets/screenshots/screenshot3.png b/pos_order_question/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..ceab21fa7 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/screenshot3.png differ diff --git a/pos_order_question/static/description/banner.jpg b/pos_order_question/static/description/banner.jpg new file mode 100644 index 000000000..8be164645 Binary files /dev/null and b/pos_order_question/static/description/banner.jpg differ diff --git a/pos_order_question/static/description/icon.png b/pos_order_question/static/description/icon.png new file mode 100644 index 000000000..5d8baea03 Binary files /dev/null and b/pos_order_question/static/description/icon.png differ diff --git a/pos_order_question/static/description/index.html b/pos_order_question/static/description/index.html new file mode 100644 index 000000000..e8d6554e3 --- /dev/null +++ b/pos_order_question/static/description/index.html @@ -0,0 +1,704 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

POS Order Questions

+

+ This module will help you to add Questions related to the Product in the session at time of ordering. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

Ask Product option Questions to Customers + in the POS Session.

+
+
+
+
+
+
+ +
+
+

Provides User friendly experience.

+
+
+
+
+
+
+ +
+
+

Provides more choices to the + Customers.

+
+
+
+
+
+
+ +
+
+

View Customer choices on Order Line.

+
+
+
+
+
+
+ +
+
+

View Customer choices on Receipt.

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

+ There will be an option to add Product related Questions in the backend.

+
+
+
+
+
+
+ +
+
+

+ From the Session, you can click on the '+' button that in the Order Line, in order to + choose the options.

+
+
+
+
+
+
+ +
+
+

+ If there is no Questions added for the Product, will show this pop-up.

+
+
+
+
+
+
+ +
+
+

+ The selected options will show in the Order Line.

+
+
+
+
+
+
+ +
+
+

+ It will also show in the Receipt.

+
+
+
+
+
+
+
    +
  • + Import users with Excel + file. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:20th April 2024 +
+

+ Initial commit for Import User with Access rights.

+
+
+
+
+
+
+
+

+ 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_order_question/static/src/css/Popups/OrderQuestionPopup.css b/pos_order_question/static/src/css/Popups/OrderQuestionPopup.css new file mode 100644 index 000000000..ef75eb2d5 --- /dev/null +++ b/pos_order_question/static/src/css/Popups/OrderQuestionPopup.css @@ -0,0 +1,30 @@ +element.style { + box-shadow: 0px; +} +.pos .popup input, .pos .popup-input { + min-height: 25px; + font-family: "Lato"; + font-size: 20px; + color: #444; + padding: 11px; + border-radius: 3px; + border: none; + box-shadow: 0px 0px 0px 1px gainsboro inset; + box-sizing: border-box; + width: 10%; +} +div#ThirdDiv { + display: flex; +} +#CheckButtonId { + /* border-radius: 0.25em; */ + margin-left: 17px; + margin-bottom: 3px; +} +.addons_items { + margin-left: 23px; + align-content: center; +} +.order-question-popup { + font-weight: bold; +} \ No newline at end of file diff --git a/pos_order_question/static/src/js/Popups/OrderQuestionPopup.js b/pos_order_question/static/src/js/Popups/OrderQuestionPopup.js new file mode 100644 index 000000000..0aa060f83 --- /dev/null +++ b/pos_order_question/static/src/js/Popups/OrderQuestionPopup.js @@ -0,0 +1,27 @@ +/** @odoo-module */ +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import {AbstractAwaitablePopup} from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +export class OrderQuestionPopup extends AbstractAwaitablePopup { + + static template = "pos_order_question.OrderQuestionPopup"; + QuestionList = []; + setup() { + super.setup(); + this.pos = usePos(); + } + _onClickCheck(ev) { + // This function will work when clicking on checkboxes.It will add questions of enabled check boxed into the list. + if (ev.target.checked === true) { + this.QuestionList.push(ev.target.parentNode.nextSibling.innerText) + } else { + this.QuestionList.pop(ev.target.parentNode.nextSibling.innerText) + } + } + async confirm() { + // This function will work when clicking on ok button in the popup.It will add selected questions into order lines. + const selectedOrderline = this.pos.get_order().get_selected_orderline(); + selectedOrderline.QuestionList = this.QuestionList + this.cancel(); + } +} diff --git a/pos_order_question/static/src/js/PosSession.js b/pos_order_question/static/src/js/PosSession.js new file mode 100644 index 000000000..fffad5e50 --- /dev/null +++ b/pos_order_question/static/src/js/PosSession.js @@ -0,0 +1,11 @@ +/** @odoo-module */ +import { patch } from "@web/core/utils/patch"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; +// Pos session +patch(PosStore.prototype, { + async _processData(loadedData) { + await super._processData(...arguments); + // Load field that in pos.order.question into pos. + this.order_questions = loadedData["pos.order.question"] || []; + } +}); diff --git a/pos_order_question/static/src/js/Screens/ProductScreen/Orderline.js b/pos_order_question/static/src/js/Screens/ProductScreen/Orderline.js new file mode 100644 index 000000000..e09134d0d --- /dev/null +++ b/pos_order_question/static/src/js/Screens/ProductScreen/Orderline.js @@ -0,0 +1,41 @@ +/** @odoo-module **/ + +import {patch} from "@web/core/utils/patch"; +import {Orderline} from "@point_of_sale/app/generic_components/orderline/orderline"; +import {useService} from "@web/core/utils/hooks"; +import {OrderQuestionPopup} from "../../Popups/OrderQuestionPopup"; +import {_t} from "@web/core/l10n/translation"; +patch(Orderline.prototype, { + setup() { + super.setup(...arguments); + // Use the nomenclature's separaor regex, else use an impossible one. + this.popup = useService("popup"); + }, + AddOptions() { + var ProductQuestions = this.props.slots.default.__ctx.line.product.order_question_ids + var OrderQuestions = this.env.services.pos.order_questions + let question = []; + for (var i = 0, len = OrderQuestions.length; i < len; i++) { + for (var j = 0, leng = ProductQuestions.length; j < leng; j++) { + if (OrderQuestions[i].id === ProductQuestions[j]) { + question.push(OrderQuestions[i].name) + } + } + } + if (question.length !== 0) { + this.popup.add(OrderQuestionPopup, { + title: _t("Extra..."), confirmText: 'Ok', + cancelText: 'Cancel', + body: question, + }); + } else { + this.popup.add(OrderQuestionPopup, { + title: _t("Add Options to Select..."), + confirmText: 'Ok', + cancelText: 'Cancel', + + }); + + } + }, +}); diff --git a/pos_order_question/static/src/js/Screens/ProductScreen/orderline.js b/pos_order_question/static/src/js/Screens/ProductScreen/orderline.js new file mode 100644 index 000000000..cbbb78b69 --- /dev/null +++ b/pos_order_question/static/src/js/Screens/ProductScreen/orderline.js @@ -0,0 +1,43 @@ +/** @odoo-module **/ + +import {patch} from "@web/core/utils/patch"; +import {Orderline} from "@point_of_sale/app/generic_components/orderline/orderline"; +import {useService} from "@web/core/utils/hooks"; +import {OrderQuestionPopup} from "../../Popups/OrderQuestionPopup"; +import {_t} from "@web/core/l10n/translation"; +patch(Orderline.prototype, { + setup() { + super.setup(...arguments); + // Use the nomenclature's separaor regex, else use an impossible one. + this.popup = useService("popup"); + }, + AddOptions() { + var ProductQuestions = this.props.slots.default.__ctx.line.product.order_question_ids + var OrderQuestions = this.env.services.pos.order_questions + let question = []; + for (var i = 0, len = OrderQuestions.length; i < len; i++) { + for (var j = 0, leng = ProductQuestions.length; j < leng; j++) { + if (OrderQuestions[i].id === ProductQuestions[j]) { + question.push(OrderQuestions[i].name) + } + } + } + if (question.length !== 0) { + this.popup.add(OrderQuestionPopup, { + title: _t("Extra..."), confirmText: 'Ok', + cancelText: 'Cancel', + body: question, + }); + } else { + this.popup.add(OrderQuestionPopup, { + title: _t("Add Options to Select..."), + confirmText: 'Ok', + cancelText: 'Cancel', + + }); + + } + }, +}); + + diff --git a/pos_order_question/static/src/js/Screens/ProductScreen/pos_orderline.js b/pos_order_question/static/src/js/Screens/ProductScreen/pos_orderline.js new file mode 100644 index 000000000..529fb852e --- /dev/null +++ b/pos_order_question/static/src/js/Screens/ProductScreen/pos_orderline.js @@ -0,0 +1,36 @@ +/** @odoo-module */ +import { patch } from "@web/core/utils/patch"; +import { Orderline } from "@point_of_sale/app/store/models"; + +//Patching Orderline to change the uom by adding a function. +patch(Orderline.prototype, { + setup(_defaultObj, options) { + super.setup(...arguments); + this.QuestionList= this.QuestionList; + }, + export_as_JSON(){ + var json = super.export_as_JSON.call(this); + this.QuestionList= this.QuestionList + return json + }, + // Set the unit from the JSON data + init_from_JSON(json){ + super.init_from_JSON(...arguments); + this.QuestionList= this.QuestionList + }, + getDisplayData() { + return { + ...super.getDisplayData(), + QuestionList: this.QuestionList + }; + }, +}); + +Orderline.props = { + ...Orderline.props, + line: { + shape: { + OrderQuestion: {type: String, optional: true}, + } + } +} diff --git a/pos_order_question/static/src/xml/Popups/OrderQuestionPopup.xml b/pos_order_question/static/src/xml/Popups/OrderQuestionPopup.xml new file mode 100644 index 000000000..567d6a48f --- /dev/null +++ b/pos_order_question/static/src/xml/Popups/OrderQuestionPopup.xml @@ -0,0 +1,45 @@ + + + + + + + diff --git a/pos_order_question/static/src/xml/Screens/ProductScreen/Orderline.xml b/pos_order_question/static/src/xml/Screens/ProductScreen/Orderline.xml new file mode 100644 index 000000000..8ae0f4d3a --- /dev/null +++ b/pos_order_question/static/src/xml/Screens/ProductScreen/Orderline.xml @@ -0,0 +1,21 @@ + + + + + +
  • + +
  • + + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    diff --git a/pos_order_question/views/product_template_view.xml b/pos_order_question/views/product_template_view.xml new file mode 100644 index 000000000..5a232b2e3 --- /dev/null +++ b/pos_order_question/views/product_template_view.xml @@ -0,0 +1,18 @@ + + + + + product.template.view.form.inherit.pos.order.question + product.template + + + + + + + + + + + +