diff --git a/age_restricted_product_pos/README.rst b/age_restricted_product_pos/README.rst new file mode 100644 index 000000000..c110b2742 --- /dev/null +++ b/age_restricted_product_pos/README.rst @@ -0,0 +1,42 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +Age Restricted Product POS +========================== +This Module will help to restrict the age restricted products in pos. + +Configuration +============= +* No additional configurations needed +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: Jumana@cybrosys, + version 16: Jumana@cybrosys + +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/age_restricted_product_pos/__init__.py b/age_restricted_product_pos/__init__.py new file mode 100644 index 000000000..8b43a1d64 --- /dev/null +++ b/age_restricted_product_pos/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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/age_restricted_product_pos/__manifest__.py b/age_restricted_product_pos/__manifest__.py new file mode 100644 index 000000000..2d643696b --- /dev/null +++ b/age_restricted_product_pos/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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': 'Age Restricted Products POS ', + 'version': '16.0.1.0.0', + 'summary': 'This Module will help to restrict the age restricted products in pos.', + 'category': 'Point of Sale', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'images': ['static/description/banner.png'], + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale', 'product'], + 'data': [ + 'views/age_restrict_product.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'age_restricted_product_pos/static/src/js/age_restrict.js', + 'age_restricted_product_pos/static/src/js/restrict_popup.js', + 'age_restricted_product_pos/static/src/xml/restrict_popup.xml', + + ], + }, + 'license': 'AGPL-3', + 'installable': True, + 'application': True, + 'auto_install': False, +} diff --git a/age_restricted_product_pos/doc/RELEASE_NOTES.md b/age_restricted_product_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..d3cdbe5ba --- /dev/null +++ b/age_restricted_product_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 18.02.2023 +#### Version 16.0.1.0.0 +#### ADD +Initial Commit \ No newline at end of file diff --git a/age_restricted_product_pos/models/__init__.py b/age_restricted_product_pos/models/__init__.py new file mode 100644 index 000000000..030fd69a4 --- /dev/null +++ b/age_restricted_product_pos/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana J() +# +# 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 age_restrict_products +from . import pos_session_load + diff --git a/age_restricted_product_pos/models/age_restrict_products.py b/age_restricted_product_pos/models/age_restrict_products.py new file mode 100644 index 000000000..2e19ce05d --- /dev/null +++ b/age_restricted_product_pos/models/age_restrict_products.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 ProductsRestrict(models.Model): + """inherited product.template""" + _inherit = 'product.template' + + is_age_restrict = fields.Boolean(string="Is Age Restricted") diff --git a/age_restricted_product_pos/models/pos_session_load.py b/age_restricted_product_pos/models/pos_session_load.py new file mode 100644 index 000000000..d58954b13 --- /dev/null +++ b/age_restricted_product_pos/models/pos_session_load.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 models + + +class PosSession(models.Model): + """inherited Pos Session""" + _inherit = 'pos.session' + + def _loader_params_product_product(self): + """loaded the field to pos""" + result = super()._loader_params_product_product() + result['search_params']['fields'].extend(['is_age_restrict']) + return result \ No newline at end of file diff --git a/age_restricted_product_pos/static/description/assets/icons/check.png b/age_restricted_product_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/check.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/chevron.png b/age_restricted_product_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/chevron.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/cogs.png b/age_restricted_product_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/cogs.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/consultation.png b/age_restricted_product_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/consultation.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/ecom-black.png b/age_restricted_product_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/ecom-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/education-black.png b/age_restricted_product_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/education-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/hotel-black.png b/age_restricted_product_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/hotel-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/license.png b/age_restricted_product_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/license.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/lifebuoy.png b/age_restricted_product_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/logo.png b/age_restricted_product_pos/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/logo.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/manufacturing-black.png b/age_restricted_product_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/pos-black.png b/age_restricted_product_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/pos-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/puzzle.png b/age_restricted_product_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/puzzle.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/restaurant-black.png b/age_restricted_product_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/service-black.png b/age_restricted_product_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/service-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/trading-black.png b/age_restricted_product_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/trading-black.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/training.png b/age_restricted_product_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/training.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/update.png b/age_restricted_product_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/update.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/user.png b/age_restricted_product_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/user.png differ diff --git a/age_restricted_product_pos/static/description/assets/icons/wrench.png b/age_restricted_product_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/icons/wrench.png differ diff --git a/age_restricted_product_pos/static/description/assets/modules/module01.png b/age_restricted_product_pos/static/description/assets/modules/module01.png new file mode 100644 index 000000000..a9936f593 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/modules/module01.png differ diff --git a/age_restricted_product_pos/static/description/assets/modules/module02.png b/age_restricted_product_pos/static/description/assets/modules/module02.png new file mode 100644 index 000000000..1a9e2cbd7 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/modules/module02.png differ diff --git a/age_restricted_product_pos/static/description/assets/modules/module03.png b/age_restricted_product_pos/static/description/assets/modules/module03.png new file mode 100644 index 000000000..d3d28e08b Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/modules/module03.png differ diff --git a/age_restricted_product_pos/static/description/assets/modules/module04.png b/age_restricted_product_pos/static/description/assets/modules/module04.png new file mode 100644 index 000000000..5297b364a Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/modules/module04.png differ diff --git a/age_restricted_product_pos/static/description/assets/modules/module05.png b/age_restricted_product_pos/static/description/assets/modules/module05.png new file mode 100644 index 000000000..2263f673e Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/modules/module05.png differ diff --git a/age_restricted_product_pos/static/description/assets/modules/module06.png b/age_restricted_product_pos/static/description/assets/modules/module06.png new file mode 100644 index 000000000..0b8c68699 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/modules/module06.png differ diff --git a/age_restricted_product_pos/static/description/assets/screenshots/SChero.png b/age_restricted_product_pos/static/description/assets/screenshots/SChero.png new file mode 100644 index 000000000..1d74df530 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/screenshots/SChero.png differ diff --git a/age_restricted_product_pos/static/description/assets/screenshots/scimg01.png b/age_restricted_product_pos/static/description/assets/screenshots/scimg01.png new file mode 100644 index 000000000..ebf88dd5c Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/screenshots/scimg01.png differ diff --git a/age_restricted_product_pos/static/description/assets/screenshots/scimg02.png b/age_restricted_product_pos/static/description/assets/screenshots/scimg02.png new file mode 100644 index 000000000..88bdb01a9 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/screenshots/scimg02.png differ diff --git a/age_restricted_product_pos/static/description/assets/screenshots/scimg03.png b/age_restricted_product_pos/static/description/assets/screenshots/scimg03.png new file mode 100644 index 000000000..55c7d0687 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/screenshots/scimg03.png differ diff --git a/age_restricted_product_pos/static/description/assets/screenshots/scimg04.png b/age_restricted_product_pos/static/description/assets/screenshots/scimg04.png new file mode 100644 index 000000000..1063dd25d Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/screenshots/scimg04.png differ diff --git a/age_restricted_product_pos/static/description/assets/screenshots/scimg05.png b/age_restricted_product_pos/static/description/assets/screenshots/scimg05.png new file mode 100644 index 000000000..540e0f894 Binary files /dev/null and b/age_restricted_product_pos/static/description/assets/screenshots/scimg05.png differ diff --git a/age_restricted_product_pos/static/description/banner.png b/age_restricted_product_pos/static/description/banner.png new file mode 100644 index 000000000..1b47df353 Binary files /dev/null and b/age_restricted_product_pos/static/description/banner.png differ diff --git a/age_restricted_product_pos/static/description/icon.png b/age_restricted_product_pos/static/description/icon.png new file mode 100644 index 000000000..9c8d3979d Binary files /dev/null and b/age_restricted_product_pos/static/description/icon.png differ diff --git a/age_restricted_product_pos/static/description/index.html b/age_restricted_product_pos/static/description/index.html new file mode 100644 index 000000000..dd562ab58 --- /dev/null +++ b/age_restricted_product_pos/static/description/index.html @@ -0,0 +1,668 @@ +
+ + +
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ + + +
+
+
+

+ Age Restricted Products in POS

+

+ Age Restricted Products in POS +

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

+ Overview +

+
+ +
+

+ This module helps to manage age restricted products in pos.Here we can make the product as age restricted one in the product form + and whenever we choose this product in pos , a popup message will appear , and notify that it is age restricted product and get identity + proof from customer, and the popup also contains approve and reject buttons , on approving ,the product it will add to the order line and + on rejecting it will cancel the order. +

+ +
+
+ + + +
+
+

+ Configuration +

+
+ +
+

+ No additional configuration required

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Community & Enterprise Support

+

+ Available in Odoo 16.0 Community and Enterprise.

+
+
+ +
+
+ +
+
+

+ Age Restricted Product.

+

+ Make a product as age restricted.

+
+
+ +
+
+ +
+
+

+ Warning for age restricted Products in POS

+

+ On choosing the age restricted products in POS + a warning will appears.

+
+
+ +
+
+ +
+
+

+ Approve and Reject based on age.

+

+ On approving the product will add to order line.

+
+
+ +
+ + + +
+
+

+ Screenshots +

+
+
+

+ Make a Product as age restricted.

+

+ By enabling the field 'Is age restricted' in product form , + make it as age restricted product. + +

+ +
+ +
+

+ Warning for Age Restricted Products.

+

+ On choosing the age restricted product in POS , a Warning message will + appear as , It is age restricted and get identity proof from customer, + it also contains approve and reject buttons. +

+ +
+ +
+

+ Approve the Product

+ +
+ +
+

+ On Approving it will add to the orderline

+ +
+ +
+ + + +
+
+

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

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/age_restricted_product_pos/static/src/js/age_restrict.js b/age_restricted_product_pos/static/src/js/age_restrict.js new file mode 100644 index 000000000..eb262a75d --- /dev/null +++ b/age_restricted_product_pos/static/src/js/age_restrict.js @@ -0,0 +1,35 @@ +odoo.define('age_restricted_product_pos.age_restrict', function (require) { +"use strict"; + const NumberBuffer = require('point_of_sale.NumberBuffer'); + const Registries = require('point_of_sale.Registries'); + const ProductScreen = require('point_of_sale.ProductScreen'); + + //Extending the product screen and on click function of the products in + //product screen ,it shows warnings as age restricted product, + //if it is age restricted one. + + const _product = (ProductScreen) => class extends ProductScreen { + + //Click function of the products. + async _clickProduct(event) { + //if product is age restricted it shows the popup and on + //confirming the popup, it will adds to the order line, on + //rejecting it will cancel the order + + if(event.detail.is_age_restrict == true ){ + const { confirmed } = await this.showPopup('RestrictPopup', + { + title: ('Age Restricted Product !!!!!!!'), + body:('Please get Identity proof from customer.'), + }); + if (confirmed){ + super._clickProduct(event) + } + } + else{ + super._clickProduct(event) + } + } + } + Registries.Component.extend(ProductScreen, _product); +}); \ No newline at end of file diff --git a/age_restricted_product_pos/static/src/js/restrict_popup.js b/age_restricted_product_pos/static/src/js/restrict_popup.js new file mode 100644 index 000000000..8dff30a74 --- /dev/null +++ b/age_restricted_product_pos/static/src/js/restrict_popup.js @@ -0,0 +1,23 @@ +odoo.define('point_of_sale.restrict_popup', 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'); + + //Restrict Popup widget by extending the Abstract Awaitable popup widget + class RestrictPopup extends AbstractAwaitablePopup { + } + //defining the template of restrict popup + RestrictPopup.template = 'RestrictPopup'; + RestrictPopup.defaultProps = { + confirmText: _lt('Approve'), + cancelText: _lt('Reject'), + title: _lt('Confirm ?'), + body: '', + }; + Registries.Component.add(RestrictPopup); + + return RestrictPopup; +}); diff --git a/age_restricted_product_pos/static/src/xml/restrict_popup.xml b/age_restricted_product_pos/static/src/xml/restrict_popup.xml new file mode 100644 index 000000000..7c94eb482 --- /dev/null +++ b/age_restricted_product_pos/static/src/xml/restrict_popup.xml @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/age_restricted_product_pos/views/age_restrict_product.xml b/age_restricted_product_pos/views/age_restrict_product.xml new file mode 100644 index 000000000..d2ec66c60 --- /dev/null +++ b/age_restricted_product_pos/views/age_restrict_product.xml @@ -0,0 +1,13 @@ + + + + product + product.template + + + + + + + + \ No newline at end of file