diff --git a/pos_order_question/README.rst b/pos_order_question/README.rst new file mode 100644 index 000000000..35c14d641 --- /dev/null +++ b/pos_order_question/README.rst @@ -0,0 +1,47 @@ +.. 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 +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: (V16) Amaya Aravind, 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_order_question/__init__.py b/pos_order_question/__init__.py new file mode 100644 index 000000000..855d2d9ed --- /dev/null +++ b/pos_order_question/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind (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_order_question/__manifest__.py b/pos_order_question/__manifest__.py new file mode 100644 index 000000000..ef0064956 --- /dev/null +++ b/pos_order_question/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind (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 Order Questions', + 'version': '16.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'], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_template_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'pos_order_question/static/src/css/Popups/OrderQuestionPopup.css', + 'pos_order_question/static/src/js/PosSession.js', + 'pos_order_question/static/src/js/Screens/ProductScreen/Orderline.js', + 'pos_order_question/static/src/js/Popups/OrderQuestionPopup.js', + 'pos_order_question/static/src/js/Screens/ReceiptScreen/OrderReceipt.js', + 'pos_order_question/static/src/xml/Screens/ProductScreen/Orderline.xml', + 'pos_order_question/static/src/xml/Popups/OrderQuestionPopup.xml', + 'pos_order_question/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml', + ] + }, + 'images': ['static/description/banner.png'], + '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..b262513ea --- /dev/null +++ b/pos_order_question/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 06.01.2024 +#### Version 16.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..a6d0865ab --- /dev/null +++ b/pos_order_question/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind (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 pos_session +from . import product_template 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..b72b49ea4 --- /dev/null +++ b/pos_order_question/models/pos_order_question.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind (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 = 'POS Order Question' + + name = fields.Char(string='Questions', help='Questions for the product.') + product_tmplt_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..975ac01ef --- /dev/null +++ b/pos_order_question/models/pos_session.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind (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 model pos session for loading field in pos_order_question + and product_product into pos session.""" + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """Supering the function to load newly created model + into pos session.""" + result = super()._pos_ui_models_to_load() + result += [ + 'pos.order.question', + ] + return result + + 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..83cc9d55e --- /dev/null +++ b/pos_order_question/models/product_template.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Amaya Aravind (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_tmplt_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/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/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/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/categories.png b/pos_order_question/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/categories.png differ diff --git a/pos_order_question/static/description/assets/misc/check-box.png b/pos_order_question/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/check-box.png differ diff --git a/pos_order_question/static/description/assets/misc/compass.png b/pos_order_question/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_order_question/static/description/assets/misc/compass.png differ diff --git a/pos_order_question/static/description/assets/misc/corporate.png b/pos_order_question/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_order_question/static/description/assets/misc/corporate.png differ diff --git a/pos_order_question/static/description/assets/misc/customer-support.png b/pos_order_question/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_order_question/static/description/assets/misc/customer-support.png differ diff --git a/pos_order_question/static/description/assets/misc/cybrosys-logo.png b/pos_order_question/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_order_question/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_order_question/static/description/assets/misc/features.png b/pos_order_question/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/features.png differ diff --git a/pos_order_question/static/description/assets/misc/logo.png b/pos_order_question/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_order_question/static/description/assets/misc/logo.png differ diff --git a/pos_order_question/static/description/assets/misc/pictures.png b/pos_order_question/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/pictures.png differ diff --git a/pos_order_question/static/description/assets/misc/pie-chart.png b/pos_order_question/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/pie-chart.png differ diff --git a/pos_order_question/static/description/assets/misc/right-arrow.png b/pos_order_question/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/right-arrow.png differ diff --git a/pos_order_question/static/description/assets/misc/star.png b/pos_order_question/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_order_question/static/description/assets/misc/star.png differ diff --git a/pos_order_question/static/description/assets/misc/support.png b/pos_order_question/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/support.png differ diff --git a/pos_order_question/static/description/assets/misc/whatsapp.png b/pos_order_question/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_order_question/static/description/assets/misc/whatsapp.png 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..5ecc4d883 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..d1d3775d6 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..dcbd0cb06 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.png b/pos_order_question/static/description/assets/modules/4.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/4.png differ diff --git a/pos_order_question/static/description/assets/modules/5.png b/pos_order_question/static/description/assets/modules/5.png new file mode 100644 index 000000000..05c8b4a69 Binary files /dev/null and b/pos_order_question/static/description/assets/modules/5.png 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..f5c24146b 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/screenshots/1.png b/pos_order_question/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..1f63736b5 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/1.png differ diff --git a/pos_order_question/static/description/assets/screenshots/2.png b/pos_order_question/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..8f93fb86b Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/2.png differ diff --git a/pos_order_question/static/description/assets/screenshots/3.png b/pos_order_question/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..f0e7c871e Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/3.png differ diff --git a/pos_order_question/static/description/assets/screenshots/4.png b/pos_order_question/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..6e7d1bbf6 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/4.png differ diff --git a/pos_order_question/static/description/assets/screenshots/5.png b/pos_order_question/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..facbcb58f Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/5.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..d20a15ede Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/hero.gif differ diff --git a/pos_order_question/static/description/banner.png b/pos_order_question/static/description/banner.png new file mode 100644 index 000000000..ddb640380 Binary files /dev/null and b/pos_order_question/static/description/banner.png 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..0ff686a5a 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..f78e58797 --- /dev/null +++ b/pos_order_question/static/description/index.html @@ -0,0 +1,558 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ POS Order Questions

+

Add Questions Related to the Product in the POS Session.

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

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

Features +

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

Screenshots +

+
+
+
+
+

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

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

+ Related + Products +

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

Our Services +

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

Our + Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ 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..a94ab9913 --- /dev/null +++ b/pos_order_question/static/src/css/Popups/OrderQuestionPopup.css @@ -0,0 +1,18 @@ +element.style { + box-shadow: 0px; +} +.pos .popup input, .pos .popup-input { + min-height: 44px; + font-family: "Lato"; + font-size: 20px; + color: #444; + padding: 10px; + border-radius: 3px; + border: none; + box-shadow: 0px 0px 0px 1px gainsboro inset; + box-sizing: border-box; + width: 10%; +} +div#ThirdDiv { + display: flex; +} 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..8a1e509fa --- /dev/null +++ b/pos_order_question/static/src/js/Popups/OrderQuestionPopup.js @@ -0,0 +1,28 @@ +/** @odoo-module **/ +// Extend AbstractAwaitablePopup to add OrderQuestionPopup + const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup'); + const Registries = require('point_of_sale.Registries'); + class OrderQuestionPopup extends AbstractAwaitablePopup { + setup() { + super.setup(); + } + _onClickCheck(){ + // This function will work when clicking on checkboxes.It will add questions of enabled check boxed into the list. + this.QuestionList = []; + var CheckButton = document.getElementById("SecDiv"); + for (var j=0, leng = CheckButton.childNodes.length- 1; j class NewPosGlobalState extends PosGlobalState { + async _processData(loadedData) { + // Load field that in pos.order.question into pos. + await super._processData(...arguments); + this.order_questions = loadedData['pos.order.question']; + } + } +Registries.Model.extend(PosGlobalState, NewPosGlobalState); 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..f129b31de --- /dev/null +++ b/pos_order_question/static/src/js/Screens/ProductScreen/Orderline.js @@ -0,0 +1,37 @@ +/** @odoo-module **/ +// Extending pos order line + const Orderline = require('point_of_sale.Orderline'); + const Registries = require('point_of_sale.Registries'); + const PosQuesOrderline = Orderline => + class extends Orderline { + AddOptions(){ + // This function will add questions of that of product into the popup. + var ProductQuestions = this.props.line.product.order_question_ids + var OrderQuestions = this.env.pos.order_questions + let question = []; + for (var i = 0, len = OrderQuestions.length; i < len; i++){ + for (var j=0, leng = ProductQuestions.length; j class QuestionInOrderline extends Orderline { + export_for_printing() { +// Supering export_for_printing() to get chose questions in receipt. + var line = super.export_for_printing(...arguments); + line.QuestionList = this.QuestionList; + return line; + } +} +Registries.Model.extend(Orderline, QuestionInOrderline); 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..a711fcd04 --- /dev/null +++ b/pos_order_question/static/src/xml/Popups/OrderQuestionPopup.xml @@ -0,0 +1,37 @@ + + + + + + + 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..12ac22c58 --- /dev/null +++ b/pos_order_question/static/src/xml/Screens/ProductScreen/Orderline.xml @@ -0,0 +1,20 @@ + + + + + +
  • + +
  • + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    diff --git a/pos_order_question/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml b/pos_order_question/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml new file mode 100644 index 000000000..e8f7315eb --- /dev/null +++ b/pos_order_question/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml @@ -0,0 +1,20 @@ + + + + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/pos_order_question/views/product_template_views.xml b/pos_order_question/views/product_template_views.xml new file mode 100644 index 000000000..cd675410d --- /dev/null +++ b/pos_order_question/views/product_template_views.xml @@ -0,0 +1,18 @@ + + + + + product.template.view.form.inherit.pos.order.question + product.template + + + + + + + + + + + +