diff --git a/dynamic_filter_editing/README.rst b/dynamic_filter_editing/README.rst new file mode 100644 index 000000000..ac0efb3bf --- /dev/null +++ b/dynamic_filter_editing/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Dynamic Filter Editing +====================== +This app is designed to assist users in editing custom filters. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V16) Athira Premanand @cybrosys, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +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/dynamic_filter_editing/__init__.py b/dynamic_filter_editing/__init__.py new file mode 100644 index 000000000..99ed22b21 --- /dev/null +++ b/dynamic_filter_editing/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# diff --git a/dynamic_filter_editing/__manifest__.py b/dynamic_filter_editing/__manifest__.py new file mode 100644 index 000000000..b0ac9fe65 --- /dev/null +++ b/dynamic_filter_editing/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Dynamic Filter Editing', + 'version': "16.0.1.0.0", + 'category': 'Extra Tools', + 'summary': "This app is designed to assist users in editing" + " custom filters", + 'description': "Through this app, users have the ability to edit custom" + "filters effortlessly. They can conveniently add multiple" + "filters, remove existing ones, and even make simultaneous" + "edits to multiple values, providing a seamless and " + "efficient editing experience.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': [ + 'base', 'web', + ], + 'assets': { + 'web.assets_backend': [ + 'dynamic_filter_editing/static/src/js/search_bar.js', + 'dynamic_filter_editing/static/src/js/filter.js', + 'dynamic_filter_editing/static/src/xml/web_searchbar_facet_views.xml', + 'dynamic_filter_editing/static/src/xml/custom_filter_dialog_views.xml', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/dynamic_filter_editing/doc/RELEASE_NOTES.md b/dynamic_filter_editing/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..5deca7298 --- /dev/null +++ b/dynamic_filter_editing/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 11.08.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial Commit for Dynamic Filter Editing diff --git a/dynamic_filter_editing/static/description/assets/icons/check.png b/dynamic_filter_editing/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/check.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/chevron.png b/dynamic_filter_editing/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/chevron.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/cogs.png b/dynamic_filter_editing/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/cogs.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/consultation.png b/dynamic_filter_editing/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/consultation.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/ecom-black.png b/dynamic_filter_editing/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/ecom-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/education-black.png b/dynamic_filter_editing/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/education-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/hotel-black.png b/dynamic_filter_editing/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/hotel-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/license.png b/dynamic_filter_editing/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/license.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/lifebuoy.png b/dynamic_filter_editing/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/lifebuoy.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/manufacturing-black.png b/dynamic_filter_editing/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/manufacturing-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/pos-black.png b/dynamic_filter_editing/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/pos-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/puzzle.png b/dynamic_filter_editing/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/puzzle.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/restaurant-black.png b/dynamic_filter_editing/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/restaurant-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/service-black.png b/dynamic_filter_editing/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/service-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/trading-black.png b/dynamic_filter_editing/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/trading-black.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/training.png b/dynamic_filter_editing/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/training.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/update.png b/dynamic_filter_editing/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/update.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/user.png b/dynamic_filter_editing/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/user.png differ diff --git a/dynamic_filter_editing/static/description/assets/icons/wrench.png b/dynamic_filter_editing/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/icons/wrench.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/categories.png b/dynamic_filter_editing/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/categories.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/check-box.png b/dynamic_filter_editing/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/check-box.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/compass.png b/dynamic_filter_editing/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/compass.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/corporate.png b/dynamic_filter_editing/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/corporate.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/customer-support.png b/dynamic_filter_editing/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/customer-support.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/cybrosys-logo.png b/dynamic_filter_editing/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/cybrosys-logo.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/features.png b/dynamic_filter_editing/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/features.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/logo.png b/dynamic_filter_editing/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/logo.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/pictures.png b/dynamic_filter_editing/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/pictures.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/pie-chart.png b/dynamic_filter_editing/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/pie-chart.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/right-arrow.png b/dynamic_filter_editing/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/right-arrow.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/star.png b/dynamic_filter_editing/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/star.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/support.png b/dynamic_filter_editing/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/support.png differ diff --git a/dynamic_filter_editing/static/description/assets/misc/whatsapp.png b/dynamic_filter_editing/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/misc/whatsapp.png differ diff --git a/dynamic_filter_editing/static/description/assets/modules/1.png b/dynamic_filter_editing/static/description/assets/modules/1.png new file mode 100644 index 000000000..df65629bf Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/modules/1.png differ diff --git a/dynamic_filter_editing/static/description/assets/modules/2.png b/dynamic_filter_editing/static/description/assets/modules/2.png new file mode 100644 index 000000000..6058f6c3b Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/modules/2.png differ diff --git a/dynamic_filter_editing/static/description/assets/modules/3.png b/dynamic_filter_editing/static/description/assets/modules/3.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/modules/3.png differ diff --git a/dynamic_filter_editing/static/description/assets/modules/4.png b/dynamic_filter_editing/static/description/assets/modules/4.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/modules/4.png differ diff --git a/dynamic_filter_editing/static/description/assets/modules/5.png b/dynamic_filter_editing/static/description/assets/modules/5.png new file mode 100644 index 000000000..2a722d66e Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/modules/5.png differ diff --git a/dynamic_filter_editing/static/description/assets/modules/6.png b/dynamic_filter_editing/static/description/assets/modules/6.png new file mode 100644 index 000000000..a44d454aa Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/modules/6.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/1.png b/dynamic_filter_editing/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..0a10f4e6f Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/1.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/10.png b/dynamic_filter_editing/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..476df0329 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/10.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/11.png b/dynamic_filter_editing/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..9f7f4ee5e Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/11.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/12.png b/dynamic_filter_editing/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..048c6f4c7 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/12.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/2.png b/dynamic_filter_editing/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..f583f4a49 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/2.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/3.png b/dynamic_filter_editing/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..6589d1bdf Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/3.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/4.png b/dynamic_filter_editing/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..26f2d3a37 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/4.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/5.png b/dynamic_filter_editing/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..9d0af190c Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/5.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/6.png b/dynamic_filter_editing/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..5e7376e9a Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/6.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/7.png b/dynamic_filter_editing/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..349bb5d8a Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/7.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/8.png b/dynamic_filter_editing/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..9bcec690d Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/8.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/9.png b/dynamic_filter_editing/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..1db9cd2b6 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/9.png differ diff --git a/dynamic_filter_editing/static/description/assets/screenshots/hero.gif b/dynamic_filter_editing/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..4b62de8c8 Binary files /dev/null and b/dynamic_filter_editing/static/description/assets/screenshots/hero.gif differ diff --git a/dynamic_filter_editing/static/description/banner.png b/dynamic_filter_editing/static/description/banner.png new file mode 100644 index 000000000..ca14571ed Binary files /dev/null and b/dynamic_filter_editing/static/description/banner.png differ diff --git a/dynamic_filter_editing/static/description/icon.png b/dynamic_filter_editing/static/description/icon.png new file mode 100644 index 000000000..e4d6d8301 Binary files /dev/null and b/dynamic_filter_editing/static/description/icon.png differ diff --git a/dynamic_filter_editing/static/description/index.html b/dynamic_filter_editing/static/description/index.html new file mode 100644 index 000000000..91d37f61d --- /dev/null +++ b/dynamic_filter_editing/static/description/index.html @@ -0,0 +1,727 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+ +
+
+ +
+
+
+ +

+ Dynamic Filter Editing

+

+ This app is designed to assist users in editing custom + filters. +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ Through this app, users have the ability to edit custom filters + effortlessly. They can conveniently add multiple filters, remove + existing ones, and even make simultaneous edits to multiple values, + providing a seamless and efficient editing experience. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Supports in Community and Enterprise edition. +
+
+ + It is designed to assist users in editing custom + filters. +
+
+
+ + The "Edit" button within the app empowers users to + modify values and apply filters based on those edited values. +
+
+ + The users can conveniently add multiple filters. +
+
+ + The users can remove existing filters. +
+
+ + The users can also make simultaneous edits to + multiple values. +
+ + +
+ + + +
+
+ +
+

+ Screenshots +

+ +
+
+
+ +
+

+ Custom Filter

+

+ The users can add the custom filter.

+ +
+ +
+

+ Edit button +

+

+ The edit button helps users to edit the values of filter. +

+ +
+ +
+

+ Dialog Box.

+

+ Users have the flexibility to input their respective + conditions for filtration, empowering them to refine their + desired output and tailor the filtering process according to + their specific preferences. +

+ +
+ +
+

+ The user has the ability to edit the existing + condition, allowing them to modify and customize the filtering + criteria according to their evolving requirements and + preferences.

+ +
+ +
+

+ Filtration based on the edited value.

+ +
+ +
+

+ Within the dialog box, users can conveniently add multiple + values.

+ +
+
+

+ The filtered result based on multiple values.

+ +
+ +
+

+ The users can remove the existing values.

+ +
+ +
+

+ One condition is removed.

+ +
+ +
+

+ Fitration based on the current value in the dialog box.

+ +
+
+

+ The users can also add multiple conditions from the custom + filter option and filter values at a time.

+ +
+
+ +

+ Fitration based on the multiple values.

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

+ Related + Products +

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

+ Our Services +

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

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/dynamic_filter_editing/static/src/js/filter.js b/dynamic_filter_editing/static/src/js/filter.js new file mode 100644 index 000000000..0b79632a5 --- /dev/null +++ b/dynamic_filter_editing/static/src/js/filter.js @@ -0,0 +1,44 @@ +/** @odoo-module **/ +import { Domain } from "@web/core/domain"; +var Dialog = require('web.Dialog'); +import { makeContext } from "@web/core/context"; +import { SearchModel } from "@web/search/search_model"; +import { patch } from 'web.utils'; +patch(SearchModel.prototype, 'filter.CustomFilterItem', { + _getFilterDomain(excludedFilterId) { + // function used to get the domain of the filter + const domain = []; + function addCondition(fieldName, valueMap) { + const ids = []; + for (const [valueId, value] of valueMap) { + if (value.checked) { + ids.push(valueId); + } + } + if (ids.length) { + domain.push([fieldName, "in", ids]); + } + } + for (const filter of this.filters) { + if (filter.id === excludedFilterId) { + continue; + } + const { fieldName, groups, values } = filter; + if (groups) { + for (const group of groups.values()) { + addCondition(fieldName, group.values); + } + } else { + addCondition(fieldName, values); + } + } + return domain; + }, + getFilterByGroup(groupId){ + // given the value of search items filter into the filter + var filter = Object.values(this.searchItems).filter((x) => { + return x.groupId == groupId + }) + return filter + } +}); diff --git a/dynamic_filter_editing/static/src/js/search_bar.js b/dynamic_filter_editing/static/src/js/search_bar.js new file mode 100644 index 000000000..25ee5d2ac --- /dev/null +++ b/dynamic_filter_editing/static/src/js/search_bar.js @@ -0,0 +1,176 @@ +/** @odoo-module **/ +import { SearchBar } from "@web/search/search_bar/search_bar"; +import CustomFilterItem from "web.CustomFilterItem"; +import { patch } from "@web/core/utils/patch"; +const { useModel } = require('web.Model'); +import { Dialog } from "@web/core/dialog/dialog"; +import { useService } from "@web/core/utils/hooks"; +import { DomainSelector } from "@web/core/domain_selector/domain_selector"; +import { DomainSelectorDialog } from "@web/core/domain_selector_dialog/domain_selector_dialog"; +import { Component, useState } from "@odoo/owl"; +import { _lt } from "@web/core/l10n/translation"; +import { parseExpr } from "@web/core/py_js/py"; + +const FIELD_TYPES = { + boolean: "boolean", + char: "char", + date: "date", + datetime: "datetime", + float: "number", + id: "id", + integer: "number", + html: "char", + many2many: "char", + many2one: "char", + monetary: "number", + one2many: "char", + text: "char", + selection: "selection", +}; +// FilterMenu parameters +const FIELD_OPERATORS = { + boolean: [ + { symbol: "=", description: _lt("is Yes"), value: true }, + { symbol: "!=", description: _lt("is No"), value: true }, + ], + char: [ + { symbol: "ilike", description: _lt("contains") }, + { symbol: "not ilike", description: _lt("doesn't contain") }, + { symbol: "=", description: _lt("is equal to") }, + { symbol: "!=", description: _lt("is not equal to") }, + { symbol: "!=", description: _lt("is set"), value: false }, + { symbol: "=", description: _lt("is not set"), value: false }, + ], + date: [ + { symbol: "=", description: _lt("is equal to") }, + { symbol: "!=", description: _lt("is not equal to") }, + { symbol: ">", description: _lt("is after") }, + { symbol: "<", description: _lt("is before") }, + { symbol: ">=", description: _lt("is after or equal to") }, + { symbol: "<=", description: _lt("is before or equal to") }, + { symbol: "between", description: _lt("is between") }, + { symbol: "!=", description: _lt("is set"), value: false }, + { symbol: "=", description: _lt("is not set"), value: false }, + ], + datetime: [ + { symbol: "between", description: _lt("is between") }, + { symbol: "=", description: _lt("is equal to") }, + { symbol: "!=", description: _lt("is not equal to") }, + { symbol: ">", description: _lt("is after") }, + { symbol: "<", description: _lt("is before") }, + { symbol: ">=", description: _lt("is after or equal to") }, + { symbol: "<=", description: _lt("is before or equal to") }, + { symbol: "!=", description: _lt("is set"), value: false }, + { symbol: "=", description: _lt("is not set"), value: false }, + ], + id: [{ symbol: "=", description: _lt("is") }], + number: [ + { symbol: "=", description: _lt("is equal to") }, + { symbol: "!=", description: _lt("is not equal to") }, + { symbol: ">", description: _lt("greater than") }, + { symbol: "<", description: _lt("less than") }, + { symbol: ">=", description: _lt("greater than or equal to") }, + { symbol: "<=", description: _lt("less than or equal to") }, + { symbol: "!=", description: _lt("is set"), value: false }, + { symbol: "=", description: _lt("is not set"), value: false }, + ], + selection: [ + { symbol: "=", description: _lt("is") }, + { symbol: "!=", description: _lt("is not") }, + { symbol: "!=", description: _lt("is set"), value: false }, + { symbol: "=", description: _lt("is not set"), value: false }, + ], +}; + +patch(SearchBar.prototype, "dynamic_filter_editing", { + // patch the search bar and parameters to the facet value also given the irFilter domain as domain + setup(){ + this._super(); + this.dialogService = useService('dialog') + }, + onFacetEdit(facet) { + var params = { + description: 'Combination', + isDefault: false, + isShared: false, + } + const { preFavorite, irFilter } = this.env.searchModel._getIrFilterDescription(params); + var domain = irFilter.domain + this.dialogService.add(CustomFilterDialog, { + className: 'bg', + resModel: this.env.searchModel.resModel, + onApplyFilter: this.onApplyFilter.bind(this), + domain + }); + }, + onApplyFilter(domain, dialog){ + // Filtering the values based on the domain, description, fields ect on the onApplyFilter function + var description = [] + var ops = [] + const fields = this.env.searchModel.searchViewFields + var cdomain = parseExpr(domain) + cdomain = cdomain.value; + cdomain.forEach((dom) => { + if(dom.type === 10){ + const field = fields[dom.value[0].value]; + const genericType = FIELD_TYPES[field.type] + const operator = FIELD_OPERATORS[genericType][dom.value[1].value] + const operator_string = operator ? operator.description.toString() : dom.value[1].value + const value = typeof dom.value[2].value !== 'object' ? dom.value[2].value : dom.value[2].value.map((val) => val.value) + description.push(`${field.string} ${operator_string} ${value}`) + } else { + if(dom.value === '&'){ + ops.push('and') + } else if (dom.value === '|'){ + ops.push('or') + } + } + }) + var description_string = '' + for(var i = 0; i < description.length; i++){ + description_string += description[i] + try{ + description_string += ` ${ops[i]} ` + } + catch { + } + } + const preFilter = { + type: "filter", + domain, + description + }; + this.env.searchModel.facets.forEach(element => { + this.env.searchModel.deactivateGroup(element.groupId) + }) + this.env.searchModel.createNewFilters([preFilter]) + dialog.props.close() + }, +}); + +class CustomFilterDialog extends Component { + //super the set up and given the domain as value + setup(){ + super.setup(); + this.state = useState({ + value: this.props.domain + }) + } + get domainSelectorProps() { + // updated the value + return { + className: this.props.className, + resModel: this.props.resModel, + isDebugMode: true, + readonly: false, + value: this.state.value, + update: (value) => { + this.state.value = value; + }, + }; + } +} +CustomFilterDialog.template = 'CustomFilterDialog' +CustomFilterDialog.components = { + Dialog, DomainSelector +} diff --git a/dynamic_filter_editing/static/src/xml/custom_filter_dialog_views.xml b/dynamic_filter_editing/static/src/xml/custom_filter_dialog_views.xml new file mode 100644 index 000000000..0bea286c3 --- /dev/null +++ b/dynamic_filter_editing/static/src/xml/custom_filter_dialog_views.xml @@ -0,0 +1,15 @@ + + + + + +
+ +
+ + + +
+
+
diff --git a/dynamic_filter_editing/static/src/xml/web_searchbar_facet_views.xml b/dynamic_filter_editing/static/src/xml/web_searchbar_facet_views.xml new file mode 100644 index 000000000..e24b5f80b --- /dev/null +++ b/dynamic_filter_editing/static/src/xml/web_searchbar_facet_views.xml @@ -0,0 +1,17 @@ + + + + + + + + + + +