diff --git a/pos_order_question/README.rst b/pos_order_question/README.rst new file mode 100644 index 000000000..7ce812eee --- /dev/null +++ b/pos_order_question/README.rst @@ -0,0 +1,51 @@ +.. 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/15.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 +Developers: (V15) 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: ``__ \ No newline at end of file diff --git a/pos_order_question/__init__.py b/pos_order_question/__init__.py new file mode 100644 index 000000000..496d15978 --- /dev/null +++ b/pos_order_question/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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..f2ffd48e2 --- /dev/null +++ b/pos_order_question/__manifest__.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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': '15.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': { + 'web.assets_backend': [ + 'pos_order_question/static/src/js/PosSession.js', + 'pos_order_question/static/src/js/Orderline.js', + 'pos_order_question/static/src/js/OrderQuestionPopup.js', + 'pos_order_question/static/src/js/OrderReceipt.js', + + ], + 'web.assets_qweb': [ + 'pos_order_question/static/src/xml/Orderline.xml', + 'pos_order_question/static/src/xml/OrderQuestionPopup.xml', + 'pos_order_question/static/src/xml/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..e245eac18 --- /dev/null +++ b/pos_order_question/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 09.09.2025 +#### Version 15.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..0da267d84 --- /dev/null +++ b/pos_order_question/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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 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..a68bacaa2 --- /dev/null +++ b/pos_order_question/models/pos_order_question.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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/product_template.py b/pos_order_question/models/product_template.py new file mode 100644 index 000000000..51d58fe09 --- /dev/null +++ b/pos_order_question/models/product_template.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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/barcode_image.png b/pos_order_question/static/description/assets/modules/barcode_image.png new file mode 100644 index 000000000..e69de29bb diff --git a/pos_order_question/static/description/assets/modules/barcode_scan_image.png b/pos_order_question/static/description/assets/modules/barcode_scan_image.png new file mode 100644 index 000000000..e69de29bb diff --git a/pos_order_question/static/description/assets/modules/payment_image.png b/pos_order_question/static/description/assets/modules/payment_image.png new file mode 100644 index 000000000..e69de29bb diff --git a/pos_order_question/static/description/assets/modules/pos_logo_image.png b/pos_order_question/static/description/assets/modules/pos_logo_image.png new file mode 100644 index 000000000..e69de29bb diff --git a/pos_order_question/static/description/assets/modules/pos_order_image.png b/pos_order_question/static/description/assets/modules/pos_order_image.png new file mode 100644 index 000000000..e69de29bb diff --git a/pos_order_question/static/description/assets/modules/pos_return_image.png b/pos_order_question/static/description/assets/modules/pos_return_image.png new file mode 100644 index 000000000..e69de29bb 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/Screenshot from 2024-09-27 10-17-44.png b/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-17-44.png new file mode 100644 index 000000000..12f36e6c5 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-17-44.png differ diff --git a/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-18-36.png b/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-18-36.png new file mode 100644 index 000000000..612b08ba2 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-18-36.png differ diff --git a/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-19-00.png b/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-19-00.png new file mode 100644 index 000000000..4f83d62c6 Binary files /dev/null and b/pos_order_question/static/description/assets/screenshots/Screenshot from 2024-09-27 10-19-00.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..899bdb500 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..169d68a1a --- /dev/null +++ b/pos_order_question/static/description/index.html @@ -0,0 +1,537 @@ +
+ +
+ +
+
+ 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. +

+ +
+
+
+ + + +
+
+

Suggested 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/js/OrderQuestionPopup.js b/pos_order_question/static/src/js/OrderQuestionPopup.js new file mode 100644 index 000000000..30da56ca0 --- /dev/null +++ b/pos_order_question/static/src/js/OrderQuestionPopup.js @@ -0,0 +1,40 @@ +odoo.define('pos_order_question.PosOrderQuestion', function (require) { + 'use strict'; + + const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup'); + const Registries = require('point_of_sale.Registries'); + const {_lt} = require('@web/core/l10n/translation'); + + class OrderQuestionPopup extends AbstractAwaitablePopup { + mounted() { + this.playSound('bell'); + } + QuestionList = []; + _onClickCheck(ev) { + // This function will work when clicking on checkboxes.It will add questions of enabled check boxed into the list. + const questionText = ev.target.parentNode.innerText.trim(); + if (ev.target.checked === true) { + this.QuestionList.push(ev.target.parentNode.innerText) + } else { + this.QuestionList = this.QuestionList.filter(item => item !== questionText); + } + } + 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.env.pos.get_order().get_selected_orderline(); + selectedOrderline.QuestionList = this.QuestionList + this.cancel(); + } + } + OrderQuestionPopup.template = 'OrderQuestionPopup'; + OrderQuestionPopup.defaultProps = { + confirmText: _lt('Ok'), + cancelText: _lt('Cancel'), + title: _lt('Error'), + body: '', + }; + + Registries.Component.add(OrderQuestionPopup); + + return OrderQuestionPopup; +}); diff --git a/pos_order_question/static/src/js/OrderReceipt.js b/pos_order_question/static/src/js/OrderReceipt.js new file mode 100644 index 000000000..83d7e6f95 --- /dev/null +++ b/pos_order_question/static/src/js/OrderReceipt.js @@ -0,0 +1,15 @@ +odoo.define('pos_order_question.OrderQuestion.js', function(require){ + "use strict"; + var models = require('point_of_sale.models'); + // Extending receipt order line + models.load_fields('product.product', 'order_question_ids'); + var _super_orderline = models.Orderline.prototype; + models.Orderline = models.Orderline.extend({ + export_for_printing: function(){ + // Supering export_for_printing() to get chose questions in receipt. + var line = _super_orderline.export_for_printing.apply(this, arguments); + line.QuestionList = this.QuestionList; + return line; + } + }); +}); diff --git a/pos_order_question/static/src/js/Orderline.js b/pos_order_question/static/src/js/Orderline.js new file mode 100644 index 000000000..dcbeef725 --- /dev/null +++ b/pos_order_question/static/src/js/Orderline.js @@ -0,0 +1,55 @@ +odoo.define('pos_order_question.OrderQuestion', function (require) { + 'use strict'; + + // Import necessary modules from the Odoo POS framework + const Registries = require('point_of_sale.Registries'); + const Orderline = require('point_of_sale.Orderline'); + const OrderWidget = require('point_of_sale.OrderWidget'); + const {Gui} = require('point_of_sale.Gui'); + + // Define a new class that extends the existing Orderline class + const OrderQuestion = (Orderline) => + class extends Orderline { + // Method to add options (questions) related to the product + AddOptions() { + // Retrieve order question IDs for the current product + var ProductQuestions = this.props.line.product.order_question_ids; + // Retrieve all available order questions from the POS environment + var OrderQuestions = this.env.pos.order_questions; + + let question = []; // Initialize an array to hold matching questions + + // Loop through each available order question + for (var i = 0, len = OrderQuestions.length; i < len; i++) { + // Loop through each product question associated with the current order line + for (var j = 0, leng = ProductQuestions.length; j < leng; j++) { + if (OrderQuestions[i].id === ProductQuestions[j]) { + question.push(OrderQuestions[i].name); + } + } + } + // Check if any questions were found + if (question.length !== 0) { + // Show a popup with the found questions + Gui.showPopup("OrderQuestionPopup", { + confirmText: 'Ok', + cancelText: 'Cancel', + title: 'Extra...', + body: question, // Body contains the array of questions + }); + } else { + // Show a popup indicating that there are no options to select + Gui.showPopup("OrderQuestionPopup", { + confirmText: 'Ok', + cancelText: 'Cancel', + title: 'Add Options to Select...', + }); + } + } + }; + + // Extend the Orderline component with the new functionality + Registries.Component.extend(Orderline, OrderQuestion); + // Return the OrderWidget (not modified in this code) + return OrderWidget; +}); 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..0f9b43bac --- /dev/null +++ b/pos_order_question/static/src/js/PosSession.js @@ -0,0 +1,21 @@ +odoo.define('pos_order_question.OrderQuestionPos', function(require){ + "use strict"; +// To load new model 'meals.planning' to pos + var models = require('point_of_sale.models'); + var _super_orderline = models.Orderline.prototype; + models.load_fields('product.product', 'order_question_ids'); + models.Orderline = models.Orderline.extend({ + initialize:function(attr,options){ + var line =_super_orderline.initialize.apply(this,arguments); + this.order_question_ids = this.product.order_question_ids; + } + }) + models.load_models([{ + model: 'pos.order.question', + fields: ['name'], + // Load specific fields from this model based on a domain filter, + loaded: function(self, order_question) { + self.order_questions = order_question; + }, + }]); +}); diff --git a/pos_order_question/static/src/xml/OrderQuestionPopup.xml b/pos_order_question/static/src/xml/OrderQuestionPopup.xml new file mode 100644 index 000000000..1fa0cb70f --- /dev/null +++ b/pos_order_question/static/src/xml/OrderQuestionPopup.xml @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/pos_order_question/static/src/xml/OrderReceipt.xml b/pos_order_question/static/src/xml/OrderReceipt.xml new file mode 100644 index 000000000..d8bcd9e0d --- /dev/null +++ b/pos_order_question/static/src/xml/OrderReceipt.xml @@ -0,0 +1,20 @@ + + diff --git a/pos_order_question/static/src/xml/Orderline.xml b/pos_order_question/static/src/xml/Orderline.xml new file mode 100644 index 000000000..766c3d473 --- /dev/null +++ b/pos_order_question/static/src/xml/Orderline.xml @@ -0,0 +1,22 @@ + + + + + + +
  • + +
  • +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    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 + + + + + + + + + + + +