diff --git a/discount_limit/README.rst b/discount_limit/README.rst deleted file mode 100644 index b3f95cbd6..000000000 --- a/discount_limit/README.rst +++ /dev/null @@ -1,51 +0,0 @@ -.. 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 Discount Limit & Restrict Global Discount -============================================= -This module adds an option to Limit the Discount for POS Product Categories and Restrict the Global Discount for POS Cashiers. - -Configuration -============= -* No additional configurations needed - -Company -------- -* `Cybrosys Techno Solutions `__ - -License -======= -General Public License, version 3 (AGPL v3). -("https://www.odoo.com/documentation/18.0/legal/licenses.html") - - -Credits -------- -Developer : (V16) Bhagyadev KP - (V17) Farhana Jahan PT, Contact: odoo@cybrosys.com - (V18) Sruthi Renjith, 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/discount_limit/__init__.py b/discount_limit/__init__.py deleted file mode 100644 index 531636dc3..000000000 --- a/discount_limit/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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/discount_limit/__manifest__.py b/discount_limit/__manifest__.py deleted file mode 100644 index e75e5634c..000000000 --- a/discount_limit/__manifest__.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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 Discount Limit & Restrict Global Discount", - 'version': '18.0.1.0.0', - 'category': 'Point of Sale', - 'summary': "This module is used to limit the discount " - "on pos product category.", - 'description': "This module is used to limit the discount on " - "pos product category and also restrict " - "the global discount for selected cashiers.", - 'author': "Cybrosys Techno Solutions", - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.cybrosys.com", - 'depends': ['point_of_sale', 'hr','web', 'pos_hr', 'pos_discount', - 'account_invoice_extract'], - 'data': [ - 'views/res_config_settings_views.xml', - 'views/product_template_views.xml', - 'views/pos_category_views.xml', - 'views/hr_employee_views.xml', - ], - 'assets': { - 'point_of_sale._assets_pos': [ - 'discount_limit/static/src/js/Orderline.js', - 'discount_limit/static/src/js/DiscountButton.js', - 'discount_limit/static/src/js/pos_store.js' - ], - }, - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/discount_limit/doc/RELEASE_NOTES.md b/discount_limit/doc/RELEASE_NOTES.md deleted file mode 100644 index 1ddb2b62a..000000000 --- a/discount_limit/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,5 +0,0 @@ -## Module -#### 11.08.2025 -#### Version 18.0.1.0.0 -##### ADD -- Initial Commit for POS Discount Limit & Restrict Global Discount diff --git a/discount_limit/models/__init__.py b/discount_limit/models/__init__.py deleted file mode 100644 index 3be28d49b..000000000 --- a/discount_limit/models/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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 hr_employee -from . import pos_category -from . import pos_config -from . import pos_session -from . import product_product -from . import res_config_settings diff --git a/discount_limit/models/hr_employee.py b/discount_limit/models/hr_employee.py deleted file mode 100644 index 42406a133..000000000 --- a/discount_limit/models/hr_employee.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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 - - -class HrEmployee(models.Model): - """ - Inheriting the 'hr.employee' model to include a boolean field - indicating whether an employee has discount control permissions. - """ - _inherit = 'hr.employee' - - has_pos_discount_control = fields.Boolean(string="Discount Control", - help="Enable to control the" - " discount") - - @api.model - def _load_pos_data_fields(self, config_id): - data = super()._load_pos_data_fields(config_id) - data += ['has_pos_discount_control'] - return data diff --git a/discount_limit/models/pos_category.py b/discount_limit/models/pos_category.py deleted file mode 100644 index cc5b5cdbc..000000000 --- a/discount_limit/models/pos_category.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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 - - -class PosCategory(models.Model): - """ - Inheriting pos_category to include discount limit settings. - """ - _inherit = 'pos.category' - - discount_limit = fields.Char(string="Discount Limit(%)", - help="Discount Limit") - apply_limit = fields.Boolean(string="Apply Limit", help="Apply Limit") - - @api.model - def _load_pos_data_fields(self, config_id): - data = super()._load_pos_data_fields(config_id) - data += ['discount_limit'] - return data diff --git a/discount_limit/models/pos_config.py b/discount_limit/models/pos_config.py deleted file mode 100644 index 885a893f5..000000000 --- a/discount_limit/models/pos_config.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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 PosConfig(models.Model): - """ - Inheriting pos_config model to set discount limit for product/product - categories. - """ - _inherit = 'pos.config' - - apply_discount_limit = fields.Selection([ - ('product', 'Product'), - ('product_category', 'Product Category')], - string="Apply Discount Limit", - help="Select product or product category option to apply discount") diff --git a/discount_limit/models/pos_session.py b/discount_limit/models/pos_session.py deleted file mode 100644 index d9fe7de81..000000000 --- a/discount_limit/models/pos_session.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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, models - - -class PosSession(models.Model): - """ - Inheriting pos_session module to load fields in pos session - """ - _inherit = 'pos.session' - - @api.model - def _load_pos_data_models(self, config_id): - """load the data to the pos.config.models""" - data = super()._load_pos_data_models(config_id) - data += ['hr.employee', 'product.product'] - return data - - def _loader_params_hr_employee(self): - """Load the field birthdate to pos.session""" - result = super()._loader_params_hr_employee() - result['search_params']['fields'].append('has_pos_discount_control') - return result diff --git a/discount_limit/models/product_product.py b/discount_limit/models/product_product.py deleted file mode 100644 index c3ba02fda..000000000 --- a/discount_limit/models/product_product.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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, models, fields - - -class ProductProduct(models.Model): - """Inheriting product_product model for adding Fields to - describe Discount Limit for POS""" - _inherit = 'product.product' - - pd_apply_limit = fields.Boolean(string="Apply limit", - help="Whether to apply") - product_discount_limit = fields.Float(string="Discount Limit(%)", - help="Product discount limit") - - @api.model - def _load_pos_data_fields(self, config_id): - data = super()._load_pos_data_fields(config_id) - data += ['product_discount_limit'] - return data diff --git a/discount_limit/models/res_config_settings.py b/discount_limit/models/res_config_settings.py deleted file mode 100644 index a65a97724..000000000 --- a/discount_limit/models/res_config_settings.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2025-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions (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 - - -class ResConfigSettings(models.TransientModel): - """Inheriting res_config_settings model to set discount limit for - product/product categories""" - _inherit = 'res.config.settings' - - limit_discount = fields.Boolean(string="Discount Limit", - help="Enable to apply limit" - "on discount limit", - config_parameter='discount_limit.' - 'limit_discount') - apply_discount_limit = fields.Selection([ - ('product', 'Product'), - ('product_category', 'Product Category')], - string="Apply Discount Limit", - related="pos_config_id.apply_discount_limit", - readonly=False, help="Select product or product category option" - " to apply discount") - - @api.onchange('apply_discount_limit') - def _onchange_apply_discount_limit(self): - """ - setting the discount_limit for product or product categories field - based on the apply_discount_limit option. - """ - products = self.env['product.product'].search( - [('available_in_pos', '=', True)]) - categories = self.env['pos.category'].search([]) - if self.apply_discount_limit == 'product': - for product in products: - product.pd_apply_limit = True - for category in categories: - category.apply_limit = False - else: - for category in categories: - category.apply_limit = True - for product in products: - product.pd_apply_limit = False diff --git a/discount_limit/static/description/assets/icons/arrows-repeat.svg b/discount_limit/static/description/assets/icons/arrows-repeat.svg deleted file mode 100755 index 1d7efabc5..000000000 --- a/discount_limit/static/description/assets/icons/arrows-repeat.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/banner-1.png b/discount_limit/static/description/assets/icons/banner-1.png deleted file mode 100755 index c180db172..000000000 Binary files a/discount_limit/static/description/assets/icons/banner-1.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/banner-2.svg b/discount_limit/static/description/assets/icons/banner-2.svg deleted file mode 100755 index e606d97d9..000000000 --- a/discount_limit/static/description/assets/icons/banner-2.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/banner-bg.png b/discount_limit/static/description/assets/icons/banner-bg.png deleted file mode 100755 index a8238d3c0..000000000 Binary files a/discount_limit/static/description/assets/icons/banner-bg.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/banner-bg.svg b/discount_limit/static/description/assets/icons/banner-bg.svg deleted file mode 100755 index b1378103e..000000000 --- a/discount_limit/static/description/assets/icons/banner-bg.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/banner-call.svg b/discount_limit/static/description/assets/icons/banner-call.svg deleted file mode 100755 index 96c687e81..000000000 --- a/discount_limit/static/description/assets/icons/banner-call.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/discount_limit/static/description/assets/icons/banner-mail.svg b/discount_limit/static/description/assets/icons/banner-mail.svg deleted file mode 100755 index cbf0d158d..000000000 --- a/discount_limit/static/description/assets/icons/banner-mail.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/discount_limit/static/description/assets/icons/banner-pattern.svg b/discount_limit/static/description/assets/icons/banner-pattern.svg deleted file mode 100755 index 9c1c7e101..000000000 --- a/discount_limit/static/description/assets/icons/banner-pattern.svg +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/banner-promo.svg b/discount_limit/static/description/assets/icons/banner-promo.svg deleted file mode 100755 index d52791b11..000000000 --- a/discount_limit/static/description/assets/icons/banner-promo.svg +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/brand-pair.svg b/discount_limit/static/description/assets/icons/brand-pair.svg deleted file mode 100755 index d8db7fc1e..000000000 --- a/discount_limit/static/description/assets/icons/brand-pair.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/check.png b/discount_limit/static/description/assets/icons/check.png deleted file mode 100755 index c8e85f51d..000000000 Binary files a/discount_limit/static/description/assets/icons/check.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/chevron.png b/discount_limit/static/description/assets/icons/chevron.png deleted file mode 100755 index 2089293d6..000000000 Binary files a/discount_limit/static/description/assets/icons/chevron.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/close-icon.svg b/discount_limit/static/description/assets/icons/close-icon.svg deleted file mode 100755 index df8cce37a..000000000 --- a/discount_limit/static/description/assets/icons/close-icon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/discount_limit/static/description/assets/icons/cogs.png b/discount_limit/static/description/assets/icons/cogs.png deleted file mode 100755 index 95d0bad62..000000000 Binary files a/discount_limit/static/description/assets/icons/cogs.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/collabarate-icon.svg b/discount_limit/static/description/assets/icons/collabarate-icon.svg deleted file mode 100755 index dd4e10518..000000000 --- a/discount_limit/static/description/assets/icons/collabarate-icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/discount_limit/static/description/assets/icons/consultation.png b/discount_limit/static/description/assets/icons/consultation.png deleted file mode 100755 index 8319d4baa..000000000 Binary files a/discount_limit/static/description/assets/icons/consultation.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/cybro-logo.png b/discount_limit/static/description/assets/icons/cybro-logo.png deleted file mode 100755 index ff4b78220..000000000 Binary files a/discount_limit/static/description/assets/icons/cybro-logo.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/down.svg b/discount_limit/static/description/assets/icons/down.svg deleted file mode 100755 index f21c36271..000000000 --- a/discount_limit/static/description/assets/icons/down.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/discount_limit/static/description/assets/icons/ecom-black.png b/discount_limit/static/description/assets/icons/ecom-black.png deleted file mode 100755 index a9385ff13..000000000 Binary files a/discount_limit/static/description/assets/icons/ecom-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/education-black.png b/discount_limit/static/description/assets/icons/education-black.png deleted file mode 100755 index 3eb09b27b..000000000 Binary files a/discount_limit/static/description/assets/icons/education-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/faq.png b/discount_limit/static/description/assets/icons/faq.png deleted file mode 100755 index 4250b5b81..000000000 Binary files a/discount_limit/static/description/assets/icons/faq.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/feature-icon.svg b/discount_limit/static/description/assets/icons/feature-icon.svg deleted file mode 100755 index fa0ea6850..000000000 --- a/discount_limit/static/description/assets/icons/feature-icon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/feature.png b/discount_limit/static/description/assets/icons/feature.png deleted file mode 100755 index ac7a785c0..000000000 Binary files a/discount_limit/static/description/assets/icons/feature.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/gear.svg b/discount_limit/static/description/assets/icons/gear.svg deleted file mode 100755 index 0cc66b6ea..000000000 --- a/discount_limit/static/description/assets/icons/gear.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/hero.gif b/discount_limit/static/description/assets/icons/hero.gif deleted file mode 100755 index 380654dfe..000000000 Binary files a/discount_limit/static/description/assets/icons/hero.gif and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/hire-odoo.svg b/discount_limit/static/description/assets/icons/hire-odoo.svg deleted file mode 100755 index e1ac089b0..000000000 --- a/discount_limit/static/description/assets/icons/hire-odoo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/hotel-black.png b/discount_limit/static/description/assets/icons/hotel-black.png deleted file mode 100755 index 130f613be..000000000 Binary files a/discount_limit/static/description/assets/icons/hotel-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/license.png b/discount_limit/static/description/assets/icons/license.png deleted file mode 100755 index a5869797e..000000000 Binary files a/discount_limit/static/description/assets/icons/license.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/life-ring-icon.svg b/discount_limit/static/description/assets/icons/life-ring-icon.svg deleted file mode 100755 index 3ae6e1d89..000000000 --- a/discount_limit/static/description/assets/icons/life-ring-icon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/lifebuoy.png b/discount_limit/static/description/assets/icons/lifebuoy.png deleted file mode 100755 index 658d56ccc..000000000 Binary files a/discount_limit/static/description/assets/icons/lifebuoy.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/mail.svg b/discount_limit/static/description/assets/icons/mail.svg deleted file mode 100755 index 1eedde695..000000000 --- a/discount_limit/static/description/assets/icons/mail.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/discount_limit/static/description/assets/icons/manufacturing-black.png b/discount_limit/static/description/assets/icons/manufacturing-black.png deleted file mode 100755 index 697eb0e9f..000000000 Binary files a/discount_limit/static/description/assets/icons/manufacturing-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/notes.png b/discount_limit/static/description/assets/icons/notes.png deleted file mode 100755 index ee5e95404..000000000 Binary files a/discount_limit/static/description/assets/icons/notes.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/notification icon.svg b/discount_limit/static/description/assets/icons/notification icon.svg deleted file mode 100755 index 053189973..000000000 --- a/discount_limit/static/description/assets/icons/notification icon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/odoo-consultancy.svg b/discount_limit/static/description/assets/icons/odoo-consultancy.svg deleted file mode 100755 index e05f65bde..000000000 --- a/discount_limit/static/description/assets/icons/odoo-consultancy.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/discount_limit/static/description/assets/icons/odoo-licencing.svg b/discount_limit/static/description/assets/icons/odoo-licencing.svg deleted file mode 100755 index 2606c88b0..000000000 --- a/discount_limit/static/description/assets/icons/odoo-licencing.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/discount_limit/static/description/assets/icons/odoo-logo.png b/discount_limit/static/description/assets/icons/odoo-logo.png deleted file mode 100755 index 0e4d0eb5a..000000000 Binary files a/discount_limit/static/description/assets/icons/odoo-logo.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/patter.svg b/discount_limit/static/description/assets/icons/patter.svg deleted file mode 100755 index 25c9c0a8f..000000000 --- a/discount_limit/static/description/assets/icons/patter.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/pattern1.png b/discount_limit/static/description/assets/icons/pattern1.png deleted file mode 100755 index 09ab0fb2d..000000000 Binary files a/discount_limit/static/description/assets/icons/pattern1.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/pos-black.png b/discount_limit/static/description/assets/icons/pos-black.png deleted file mode 100755 index 97c0f90c1..000000000 Binary files a/discount_limit/static/description/assets/icons/pos-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/puzzle-piece-icon.svg b/discount_limit/static/description/assets/icons/puzzle-piece-icon.svg deleted file mode 100755 index 3e9ad9373..000000000 --- a/discount_limit/static/description/assets/icons/puzzle-piece-icon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/puzzle.png b/discount_limit/static/description/assets/icons/puzzle.png deleted file mode 100755 index 65cf854e7..000000000 Binary files a/discount_limit/static/description/assets/icons/puzzle.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/replace-icon.svg b/discount_limit/static/description/assets/icons/replace-icon.svg deleted file mode 100755 index d0e3a7af1..000000000 --- a/discount_limit/static/description/assets/icons/replace-icon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/restaurant-black.png b/discount_limit/static/description/assets/icons/restaurant-black.png deleted file mode 100755 index 4a35eb939..000000000 Binary files a/discount_limit/static/description/assets/icons/restaurant-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/screenshot-main.png b/discount_limit/static/description/assets/icons/screenshot-main.png deleted file mode 100755 index 575f8e676..000000000 Binary files a/discount_limit/static/description/assets/icons/screenshot-main.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/screenshot.png b/discount_limit/static/description/assets/icons/screenshot.png deleted file mode 100755 index cef272529..000000000 Binary files a/discount_limit/static/description/assets/icons/screenshot.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/service-black.png b/discount_limit/static/description/assets/icons/service-black.png deleted file mode 100755 index 301ab51cb..000000000 Binary files a/discount_limit/static/description/assets/icons/service-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/skype-fill.svg b/discount_limit/static/description/assets/icons/skype-fill.svg deleted file mode 100755 index c17423639..000000000 --- a/discount_limit/static/description/assets/icons/skype-fill.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/skype.png b/discount_limit/static/description/assets/icons/skype.png deleted file mode 100755 index 51b409fb3..000000000 Binary files a/discount_limit/static/description/assets/icons/skype.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/skype.svg b/discount_limit/static/description/assets/icons/skype.svg deleted file mode 100755 index df3dad39b..000000000 --- a/discount_limit/static/description/assets/icons/skype.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/discount_limit/static/description/assets/icons/star-1.svg b/discount_limit/static/description/assets/icons/star-1.svg deleted file mode 100755 index 7e55ab162..000000000 --- a/discount_limit/static/description/assets/icons/star-1.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/star-2.svg b/discount_limit/static/description/assets/icons/star-2.svg deleted file mode 100755 index 5ae9f507a..000000000 --- a/discount_limit/static/description/assets/icons/star-2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/support.png b/discount_limit/static/description/assets/icons/support.png deleted file mode 100755 index 4f18b8b82..000000000 Binary files a/discount_limit/static/description/assets/icons/support.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/test-1 - Copy.png b/discount_limit/static/description/assets/icons/test-1 - Copy.png deleted file mode 100755 index f6a902663..000000000 Binary files a/discount_limit/static/description/assets/icons/test-1 - Copy.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/test-1.png b/discount_limit/static/description/assets/icons/test-1.png deleted file mode 100755 index 0908add2b..000000000 Binary files a/discount_limit/static/description/assets/icons/test-1.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/test-2.png b/discount_limit/static/description/assets/icons/test-2.png deleted file mode 100755 index 4671fe91e..000000000 Binary files a/discount_limit/static/description/assets/icons/test-2.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/trading-black.png b/discount_limit/static/description/assets/icons/trading-black.png deleted file mode 100755 index 9398ba2f1..000000000 Binary files a/discount_limit/static/description/assets/icons/trading-black.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/training.png b/discount_limit/static/description/assets/icons/training.png deleted file mode 100755 index 884ca024d..000000000 Binary files a/discount_limit/static/description/assets/icons/training.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/translate.svg b/discount_limit/static/description/assets/icons/translate.svg deleted file mode 100755 index af9c8a1aa..000000000 --- a/discount_limit/static/description/assets/icons/translate.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/update.png b/discount_limit/static/description/assets/icons/update.png deleted file mode 100755 index ecbc5a01a..000000000 Binary files a/discount_limit/static/description/assets/icons/update.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/user.png b/discount_limit/static/description/assets/icons/user.png deleted file mode 100755 index 6ffb23d9f..000000000 Binary files a/discount_limit/static/description/assets/icons/user.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/video.png b/discount_limit/static/description/assets/icons/video.png deleted file mode 100755 index 576705b17..000000000 Binary files a/discount_limit/static/description/assets/icons/video.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/whatsapp.png b/discount_limit/static/description/assets/icons/whatsapp.png deleted file mode 100755 index d513a5356..000000000 Binary files a/discount_limit/static/description/assets/icons/whatsapp.png and /dev/null differ diff --git a/discount_limit/static/description/assets/icons/wrench-icon.svg b/discount_limit/static/description/assets/icons/wrench-icon.svg deleted file mode 100755 index 174b5a465..000000000 --- a/discount_limit/static/description/assets/icons/wrench-icon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/discount_limit/static/description/assets/icons/wrench.png b/discount_limit/static/description/assets/icons/wrench.png deleted file mode 100755 index 6c04dea0f..000000000 Binary files a/discount_limit/static/description/assets/icons/wrench.png and /dev/null differ diff --git a/discount_limit/static/description/assets/misc/Cybrosys R.png b/discount_limit/static/description/assets/misc/Cybrosys R.png deleted file mode 100644 index da4058087..000000000 Binary files a/discount_limit/static/description/assets/misc/Cybrosys R.png and /dev/null differ diff --git a/discount_limit/static/description/assets/misc/email.svg b/discount_limit/static/description/assets/misc/email.svg deleted file mode 100644 index 15291cdc3..000000000 --- a/discount_limit/static/description/assets/misc/email.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/misc/phone.svg b/discount_limit/static/description/assets/misc/phone.svg deleted file mode 100644 index b7bd7f251..000000000 --- a/discount_limit/static/description/assets/misc/phone.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/discount_limit/static/description/assets/misc/star (1) 2.svg b/discount_limit/static/description/assets/misc/star (1) 2.svg deleted file mode 100644 index 5ae9f507a..000000000 --- a/discount_limit/static/description/assets/misc/star (1) 2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/discount_limit/static/description/assets/misc/support (1) 1.svg b/discount_limit/static/description/assets/misc/support (1) 1.svg deleted file mode 100644 index 7d37a8f30..000000000 --- a/discount_limit/static/description/assets/misc/support (1) 1.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/discount_limit/static/description/assets/misc/support-email.svg b/discount_limit/static/description/assets/misc/support-email.svg deleted file mode 100644 index eb70370d6..000000000 --- a/discount_limit/static/description/assets/misc/support-email.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/discount_limit/static/description/assets/misc/tick-mark.svg b/discount_limit/static/description/assets/misc/tick-mark.svg deleted file mode 100644 index 2dbb40187..000000000 --- a/discount_limit/static/description/assets/misc/tick-mark.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/misc/whatsapp 1.svg b/discount_limit/static/description/assets/misc/whatsapp 1.svg deleted file mode 100644 index 0bfaf8fc6..000000000 --- a/discount_limit/static/description/assets/misc/whatsapp 1.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/discount_limit/static/description/assets/misc/whatsapp.svg b/discount_limit/static/description/assets/misc/whatsapp.svg deleted file mode 100644 index b618aea1d..000000000 --- a/discount_limit/static/description/assets/misc/whatsapp.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/discount_limit/static/description/assets/modules/1.jpg b/discount_limit/static/description/assets/modules/1.jpg deleted file mode 100644 index 3cb15fe01..000000000 Binary files a/discount_limit/static/description/assets/modules/1.jpg and /dev/null differ diff --git a/discount_limit/static/description/assets/modules/2.jpg b/discount_limit/static/description/assets/modules/2.jpg deleted file mode 100644 index 662cadcc3..000000000 Binary files a/discount_limit/static/description/assets/modules/2.jpg and /dev/null differ diff --git a/discount_limit/static/description/assets/modules/3.jpg b/discount_limit/static/description/assets/modules/3.jpg deleted file mode 100644 index 717a00443..000000000 Binary files a/discount_limit/static/description/assets/modules/3.jpg and /dev/null differ diff --git a/discount_limit/static/description/assets/modules/4.png b/discount_limit/static/description/assets/modules/4.png deleted file mode 100644 index 00ebf54ad..000000000 Binary files a/discount_limit/static/description/assets/modules/4.png and /dev/null differ diff --git a/discount_limit/static/description/assets/modules/5.jpg b/discount_limit/static/description/assets/modules/5.jpg deleted file mode 100644 index 7c67e2eec..000000000 Binary files a/discount_limit/static/description/assets/modules/5.jpg and /dev/null differ diff --git a/discount_limit/static/description/assets/modules/6.gif b/discount_limit/static/description/assets/modules/6.gif deleted file mode 100644 index a35ece8df..000000000 Binary files a/discount_limit/static/description/assets/modules/6.gif and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/1.png b/discount_limit/static/description/assets/screenshots/1.png deleted file mode 100644 index 490d8f2a4..000000000 Binary files a/discount_limit/static/description/assets/screenshots/1.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/2.png b/discount_limit/static/description/assets/screenshots/2.png deleted file mode 100644 index 2daa210f8..000000000 Binary files a/discount_limit/static/description/assets/screenshots/2.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/3.png b/discount_limit/static/description/assets/screenshots/3.png deleted file mode 100644 index 29af65d31..000000000 Binary files a/discount_limit/static/description/assets/screenshots/3.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/4.png b/discount_limit/static/description/assets/screenshots/4.png deleted file mode 100644 index cadaf61a9..000000000 Binary files a/discount_limit/static/description/assets/screenshots/4.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/5.png b/discount_limit/static/description/assets/screenshots/5.png deleted file mode 100644 index 7b4120a22..000000000 Binary files a/discount_limit/static/description/assets/screenshots/5.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/6.png b/discount_limit/static/description/assets/screenshots/6.png deleted file mode 100644 index da6f20422..000000000 Binary files a/discount_limit/static/description/assets/screenshots/6.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/7.png b/discount_limit/static/description/assets/screenshots/7.png deleted file mode 100644 index d60467200..000000000 Binary files a/discount_limit/static/description/assets/screenshots/7.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/8.png b/discount_limit/static/description/assets/screenshots/8.png deleted file mode 100644 index dc6f69115..000000000 Binary files a/discount_limit/static/description/assets/screenshots/8.png and /dev/null differ diff --git a/discount_limit/static/description/assets/screenshots/hero.gif b/discount_limit/static/description/assets/screenshots/hero.gif deleted file mode 100644 index 8a88e0c3c..000000000 Binary files a/discount_limit/static/description/assets/screenshots/hero.gif and /dev/null differ diff --git a/discount_limit/static/description/banner.jpg b/discount_limit/static/description/banner.jpg deleted file mode 100644 index 1483792db..000000000 Binary files a/discount_limit/static/description/banner.jpg and /dev/null differ diff --git a/discount_limit/static/description/icon.png b/discount_limit/static/description/icon.png deleted file mode 100644 index ff1e7ba74..000000000 Binary files a/discount_limit/static/description/icon.png and /dev/null differ diff --git a/discount_limit/static/description/index.html b/discount_limit/static/description/index.html deleted file mode 100644 index e67e7c055..000000000 --- a/discount_limit/static/description/index.html +++ /dev/null @@ -1,1126 +0,0 @@ - - - - - - POS Discount Limit - - - - - - - - - - -
-
- - - -
-
- Community -
-
- Enterprise -
-
- Odoo.sh -
-
-
- -
-
-
-
-

- Limit the Discount on POS. -

-

POS Discount Limit & Restrict Global Discount -

-
-
- -
- -
- -
-
-
- -
-
- -
-
- - -
-
-
-

Key - Highlights

-
-
-
-
- -
-
- Limit the discount for Products -
-

- When apply - discount limit for Product Can't give the - discount greater than the specified limit.

-
-
-
-
-
- -
-
- Limit the discount for product categories -
-

- When apply - discount limit for product categories Can't give - the discount greater than the specified limit. -

-
-
-
-
-
- -
-
- Restrict global discount for selected POS - cashiers -
-

- Cannot Apply - Global Discount if Cashier has no Discount - Control. -

-
-
- -
-
- -
-
-
- POS Discount Limit & Restrict Global Discount -

- Are you ready to make your business more - organized? -
Improve now! -

- -
-
- -
-
-
- - - - -
-
- -
-
-
-
- acc_bg -
- -
-
-
-
-

- Configuration - - Menu -

-
-
-

- Choose Product on Limit the Discount Field - in POS Configuration Settings. -

-
-
-
- -
-
-
-
-
-
-
-
-
-

- Product - - Configuration. -

-
-
-

- Discount Limit Field in POS Product. -

-
-
-
- -
-
-
-
-
-
-
-
-
-

- Restriction - on Discount -

-
-
-

- Can't give the discount greater than the - specified limit. -

-
-
-
- -
-
-
-
-
-
-
-
-
-

- Choose - - Product category -

-
-
-

- Choose Product category on Limit the - Discount Field in POS Configuration - Settings. -

-
-
-
- -
-
-
-
-
-
-
-
-
-

- Discount - - - Limit -

-
-
-

- Discount Limit Field in POS Product - category. -

-
-
-
- -
-
-
-
-
-
-
-
-
-

- Discount - - - Control -

-
-
-

- Discount Control check box in HR settings. -

-
-
-
- -
-
-
-

- Add employees who have restrictions on - discounts. -

-
-
-
- -
-
-
-

- Enable Global Discount in POS settings. -

-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
-
- -
-

- Limit the discount for Products.

-
- -
-
-
-
-
-
- -
-

- Limit the discount for product categories.

-
-
-
-
-
-
-
- -
-

- Restrict global discount for selected POS cashiers.

-
- -
-
- -
-
-
-
-
-
-
- -
- -
- -
-

- On the product form page, an additional field is added, storing the maximum allowed discount for that product. The value is saved directly in the product.product model. -

-
-
- -
- -
-

- A similar field for discount limits is available on the product category form. -

-
-
- -
- -
-

- Inside the employee form, there is a boolean field that determines whether the employee can apply discounts in POS. -

-
-
- -
- -
-

- There will appear a popup informing the user that the discount exceeds the allowed limit or that they are not permitted to give discounts. -

-
-
-
- -
-
-
-
-
-
- -
-
-

- Latest Release 18.0.1.0.0 -

- - 26th September, 2024 - -
-
-
-
-
- Add -
-
-
-
    -
  • - Initial Commit -
  • - -
-
-
-
-
-
-
-
-
-
- - - -
-

- Related Products -

- -
- - -
-

- Our Services

- -
- -
-
- .... -
-
- -
- - -
-
- - - - - - diff --git a/discount_limit/static/src/js/DiscountButton.js b/discount_limit/static/src/js/DiscountButton.js deleted file mode 100644 index 3a7d3bc71..000000000 --- a/discount_limit/static/src/js/DiscountButton.js +++ /dev/null @@ -1,33 +0,0 @@ -/** @odoo-module */ - -import { _t } from "@web/core/l10n/translation"; -import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; -import { patch } from "@web/core/utils/patch"; -import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; - -patch(ControlButtons.prototype, { - async clickDiscount() { - /**Add Popup error when Cashier is not allowed for apply Discount Limit**/ - var self=this; - if (this.pos.cashier.has_pos_discount_control===true){ - return this.notification.add(_t("You must be granted access to apply discount."), { - title: _t("Discount Restricted"), - type: "danger", - }); - } - else - { - this.dialog.add(NumberPopup, { - title: _t("Discount Percentage"), - startingValue: this.pos.config.discount_pc, - getPayload: (num) => { - const val = Math.max( - 0, - Math.min(100, this.env.utils.parseValidFloat(num.toString())) - ); - this.apply_discount(val); - }, - }); - } - }, -}); diff --git a/discount_limit/static/src/js/Orderline.js b/discount_limit/static/src/js/Orderline.js deleted file mode 100644 index 6acc4d4b1..000000000 --- a/discount_limit/static/src/js/Orderline.js +++ /dev/null @@ -1,100 +0,0 @@ -/** @odoo-module */ -import { PosOrderline } from "@point_of_sale/app/models/pos_order_line"; -import { patch } from "@web/core/utils/patch"; -import { parseFloat as oParseFloat } from "@web/views/fields/parsers"; -import { _t } from "@web/core/l10n/translation"; -import { useService } from "@web/core/utils/hooks"; -import { usePos } from "@point_of_sale/app/store/pos_hook"; - - -patch(PosOrderline.prototype, { - setup() { - super.setup(...arguments); - }, - set_discount(discount) { - /**Add Popup error when Discount Limit is applied for POS Orderline**/ - var order = this.order_id; - if (order) { - var pos_prod_id = order.get_selected_orderline().product_id.pos_categ_ids[0] - if (order.config.apply_discount_limit == false) { - var parsed_discount = - typeof discount === "number" ? - discount : - isNaN(parseFloat(discount)) ? - 0 : - oParseFloat("" + discount); - var disc = Math.min(Math.max(parsed_discount || 0, 0), 100); - this.discount = disc; - this.discountStr = "" + disc; - } else if (order.config.apply_discount_limit == 'product_category') { - var rounded = Math.round(discount); - if (Number.isInteger(pos_prod_id.id)) { - if (this.get_product().pos_categ_ids[0].discount_limit) { - if (rounded > this.get_product().pos_categ_ids[0].discount_limit) { - return { - title: _t("Discount Not Possible"), - body: _t( - "You cannot apply discount above the discount limit." - ), - }; - } else { - var parsed_discount = - typeof discount === "number" ? - discount : - isNaN(parseFloat(discount)) ? - 0 : - oParseFloat("" + discount); - var disc = Math.min(Math.max(parsed_discount || 0, 0), 100); - this.discount = disc; - this.discountStr = "" + disc; - } - } else { - var parsed_discount = - typeof discount === "number" ? - discount : - isNaN(parseFloat(discount)) ? - 0 : - oParseFloat("" + discount); - var disc = Math.min(Math.max(parsed_discount || 0, 0), 100); - this.discount = disc; - this.discountStr = "" + disc; - } - } - } else if (order.config.apply_discount_limit == 'product') { - var rounded = Math.round(discount); - if (Number.isInteger(pos_prod_id.id)) { - if (this.get_product().product_discount_limit) { - if (rounded > this.get_product().product_discount_limit) { - return { - title: _t("Discount Not Possible"), - body: _t( - "You cannot apply discount above the discount limit." - ), - }; - } else { - var parsed_discount = - typeof discount === "number" ? - discount : - isNaN(parseFloat(discount)) ? - 0 : - oParseFloat("" + discount); - var disc = Math.min(Math.max(parsed_discount || 0, 0), 100); - this.discount = disc; - this.discountStr = "" + disc; - } - } else { - var parsed_discount = - typeof discount === "number" ? - discount : - isNaN(parseFloat(discount)) ? - 0 : - oParseFloat("" + discount); - var disc = Math.min(Math.max(parsed_discount || 0, 0), 100); - this.discount = disc; - this.discountStr = "" + disc; - } - } - } - } - }, -}); diff --git a/discount_limit/static/src/js/pos_store.js b/discount_limit/static/src/js/pos_store.js deleted file mode 100644 index 15a9e11ed..000000000 --- a/discount_limit/static/src/js/pos_store.js +++ /dev/null @@ -1,18 +0,0 @@ -/** @odoo-module */ -import { patch } from "@web/core/utils/patch"; -import { _t } from "@web/core/l10n/translation"; -import { PosStore } from "@point_of_sale/app/store/pos_store"; -import { AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; - - -patch(PosStore.prototype, { - async setDiscountFromUI(line, val) { - var a = line.set_discount(val) || ''; - if (a && a.title == "Discount Not Possible"){ - this.dialog.add(AlertDialog, { - title: _t("Discount Not Possible"), - body: _t("You cannot apply discount above the discount limit."), - }); - } - } -}) diff --git a/discount_limit/views/hr_employee_views.xml b/discount_limit/views/hr_employee_views.xml deleted file mode 100644 index 27d014844..000000000 --- a/discount_limit/views/hr_employee_views.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - hr.employee.view.form.inherit.discount.limit - hr.employee - - - - - - - - - - diff --git a/discount_limit/views/pos_category_views.xml b/discount_limit/views/pos_category_views.xml deleted file mode 100644 index 7012eeec5..000000000 --- a/discount_limit/views/pos_category_views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - pos.category.view.form.inherit.discount.limit - pos.category - - - - - - - - - diff --git a/discount_limit/views/product_template_views.xml b/discount_limit/views/product_template_views.xml deleted file mode 100644 index 3039ec0fa..000000000 --- a/discount_limit/views/product_template_views.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - product.product.view.form.inherit.discount.limit - - product.product - - - - - - - - - diff --git a/discount_limit/views/res_config_settings_views.xml b/discount_limit/views/res_config_settings_views.xml deleted file mode 100644 index d735b5cd0..000000000 --- a/discount_limit/views/res_config_settings_views.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - res.config.settings.view.form.inherit.discount.limit - - res.config.settings - - - -
-
- -
-
-
-
-
-
-
-