diff --git a/master_search/README.rst b/master_search/README.rst new file mode 100755 index 000000000..60b1155c3 --- /dev/null +++ b/master_search/README.rst @@ -0,0 +1,51 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Global Search +============= +This module allows users to search the records in Customers, Products, Sale, Purchase, Inventory and Accounting Modules. + +Configuration +============= +* No additional configuration is needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, v3.0 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (v14) Shahil, + (v15) Athul, + (v16) Rosmy, + (v17) Anjhana A K, + (v18) Aysha Shalin + 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/master_search/__init__.py b/master_search/__init__.py new file mode 100644 index 000000000..af59d28d6 --- /dev/null +++ b/master_search/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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/master_search/__manifest__.py b/master_search/__manifest__.py new file mode 100644 index 000000000..c82e466a1 --- /dev/null +++ b/master_search/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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': 'Global Search', + 'version': '18.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """Easy Search in Customers, Products, Sale, Purchase, Inventory + and Accounting modules""", + 'description': """This module allows users to search the records in + Customers, Products, Sale, Purchase, Inventory and Accounting Modules.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'stock', 'sale', 'purchase'], + 'data': [ + 'security/master_search_security.xml', + 'security/ir.model.access.csv', + 'views/master_search_view.xml' + ], + 'assets': { + 'web.assets_backend': [ + 'master_search/static/src/scss/master_search.scss', + 'master_search/static/src/js/master_search.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/master_search/doc/RELEASE_NOTES.md b/master_search/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..7c0ce0472 --- /dev/null +++ b/master_search/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 30.11.2024 +#### Version 18.0.1.0.0 +##### ADD +- Initial Commit for Global Search diff --git a/master_search/models/__init__.py b/master_search/models/__init__.py new file mode 100644 index 000000000..6bc7968b8 --- /dev/null +++ b/master_search/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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 master_search diff --git a/master_search/models/master_search.py b/master_search/models/master_search.py new file mode 100644 index 000000000..692980a7f --- /dev/null +++ b/master_search/models/master_search.py @@ -0,0 +1,317 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC +# LICENSE (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class MasterSearch(models.Model): + """ Master search model for easy search """ + _name = 'master.search' + _description = "Model for master search" + _rec_name = 'name' + _order = "create_date desc" + + name = fields.Char(string="Name", default=lambda self: _('Search'), + help='Searched names') + search_string = fields.Char(string="Search", help='Details to search') + search_mode = fields.Selection( + [('all', 'All'), ('active', 'Active'), + ('inactive', 'Inactive')], + string="Search Mode", default="active", help='Search Details based on') + search_by = fields.Selection( + [('any', 'Any'), ('customer', 'Customer'), + ('product', 'Product'), + ('sale details', 'Sale'), + ('purchase details', 'Purchase'), + ('transaction details', 'Inventory'), + ('account details', 'Accounting')], + string="Search By", default='any', help='Search in which model') + master_search_ids = fields.Many2many('master.search', + 'master_search_self_rel', + 'search_id', + 'search_id1', + compute="_get_recent_searches", + limit=1, help='Recent search details') + history_count = fields.Integer(string="History Count", + compute="_get_history_count", + help='Recent search History Count') + customer_ids = fields.Many2many('res.partner', + 'master_search_company_rel', + 'search_id', 'company_id', + help='To fetch datas of customer search') + product_ids = fields.Many2many('product.template', + 'master_search_product_rel', + 'search_id', 'company_id', + help='To fetch datas of product search') + transaction_ids = fields.Many2many('stock.picking', + 'master_search_transaction_rel', + 'search_id', + 'company_id', + string="Inventory", + help='To fetch datas of inventory' + ' search') + customer_count = fields.Integer(string="Company Count", + compute="_get_operator_count", + help='To fetched customer search count') + product_count = fields.Integer(string="Product Count", + compute="_get_product_count", + help='To fetched product search count') + transaction_count = fields.Integer(string="Transaction Count", + compute="_get_transaction_count", + help='To fetched inventory search ' + 'count') + sale_count = fields.Integer(string="Sale Count", compute="_get_sale_count", + help='To fetched sale search count') + purchase_count = fields.Integer(string="Sale Count", + compute="_get_purchase_count", + help='To fetched purchase search count') + account_count = fields.Integer(string="Account Count", + compute="_get_account_count", + help='To fetched account search count') + user_id = fields.Many2one('res.users', string="User", + default=lambda self: self.env.user) + match_entire = fields.Boolean(string="Match entire sentence", + help='Only matched datas to be viewed') + sale_ids = fields.Many2many('sale.order', + 'master_search_sale_details_rel', + 'search_id', 'company_id', + string="Sale", help='To fetch datas of sale ' + 'search') + purchase_ids = fields.Many2many('purchase.order', + 'master_search_purchase_details_rel', + 'search_id', 'company_id', + string="Sale", help='To fetch datas of' + ' purchase search') + account_ids = fields.Many2many('account.move', + 'master_search_account_details_rel', + 'search_id', 'company_id', + string="Account", help='To fetch datas of' + 'account search') + + @api.depends('search_string') + def _get_recent_searches(self): + """ Get recent searches """ + try: + current_id = self.id if isinstance(self.id, int) \ + else self._origin.id + except: + current_id = False + pass + empty_search = self.env['master.search'].search( + [('search_string', 'in', ['', False]), + ('id', 'not in', [current_id, False] + if current_id else [False])]) + if empty_search: + empty_search.unlink() + recent_searches = self.env['master.search'].search([ + ('search_string', 'not in', ['', False])]) + self.master_search_ids = recent_searches + + def action_unlink_search(self): + """ Unlink search """ + self.unlink() + action = self.env.ref('master_search.master_search_action').read()[0] + return action + + @api.depends('master_search_ids') + def _get_history_count(self): + """ Get history count """ + self.history_count = len(self.master_search_ids) + + @api.depends('product_ids') + def _get_product_count(self): + """ Get product count """ + self.product_count = len(self.product_ids) + + @api.depends('customer_ids') + def _get_operator_count(self): + """ Get customer count """ + self.customer_count = len(self.customer_ids) + + @api.depends('transaction_count') + def _get_transaction_count(self): + """ Get transaction details count """ + self.transaction_count = len(self.transaction_ids) + + @api.depends('sale_count') + def _get_sale_count(self): + """ Get sale details count """ + self.sale_count = len(self.sale_ids) + + @api.depends('purchase_count') + def _get_purchase_count(self): + """ Get purchase details count """ + self.purchase_count = len(self.purchase_ids) + + @api.depends('account_count') + def _get_account_count(self): + """ Get account details count """ + self.account_count = len(self.account_ids) + + def action_clear_search(self): + """ clear search input """ + self.search_string = "" + self.name = "Search" + + @api.model_create_multi + def create(self, vals_list): + """ Function for unlink first result and raise error if no string """ + res = super(MasterSearch, self).create(vals_list) + search_index = self.env['master.search'].search_count( + [('user_id', '=', self.env.user.id)]) + # unlink old search result if count greater than 10 + if search_index > 10: + last_search = self.env['master.search'].search( + [('id', '!=', res.id), ('user_id', '=', self.env.user.id)], + order="create_date asc", limit=1) + last_search.unlink() if last_search else False + return res + + def action_search(self): + """ search for the string and store search data """ + if self.search_string and "*" in self.search_string: + return + if not self.search_string: + raise UserError(_("Please provide a search string!")) + search_keys = self.search_string.split(" ") + self.customer_ids = self.product_ids = self.transaction_ids = False + if self.match_entire: + return self._search_query(self.search_string) + for key in search_keys: + self._search_query(key) + self.name = self.search_string + + def _search_query(self, key): + """ search for the model with given key and update result """ + company_id = self.env.user.company_id.id + if self.search_mode == 'all': + active_qry = """ and obj.active in ({},{}) + """.format("'FALSE'", "'TRUE'") + elif self.search_mode == 'active': + active_qry = """ and obj.active in ({})""".format("'TRUE'") + else: + active_qry = """ and obj.active in ({})""".format("'FALSE'") + self._search_customer(key, active_qry) \ + if self.search_by in ['any', 'customer'] else False + self._search_products(key, active_qry, company_id) \ + if self.search_by in ['any', 'product'] else False + self._search_inventory_transactions(key, active_qry, company_id) \ + if self.search_by in ['any', 'transaction details'] else False + self._search_sale_transactions(key, active_qry, company_id) \ + if self.search_by in ['any', 'sale details'] else False + self._search_purchase_transactions(key, active_qry, company_id) \ + if self.search_by in ['any', 'purchase details'] else False + self._search_account_transactions(key, active_qry, company_id) \ + if self.search_by in ['any', 'account details'] else False + + def _search_account_transactions(self, key, active_qry, company_id): + """ Search for all account transactions """ + sp_query = """ SELECT am.id from account_move am + LEFT JOIN res_partner p on p.id = am.partner_id + WHERE am.company_id = {op_id} AND (am.name ILIKE '%{key}%' OR + p.name ILIKE '%{key}%' OR am.state ILIKE '%{key}%') + GROUP BY am.id,p.name + """ + self._cr.execute( + sp_query.format(op_id=company_id, key=key, active=active_qry)) + moves = self._cr.dictfetchall() + move_ids = self.env['account.move'].browse([i['id'] for i in moves]) + self.account_ids += move_ids + + def _search_purchase_transactions(self, key, active_qry, company_id): + """ Search for all purchase transactions """ + sp_query = """ SELECT po.id from purchase_order po + LEFT JOIN res_partner p on p.id = po.partner_id + WHERE po.company_id = {op_id} AND (po.name ILIKE '%{key}%' OR + p.name ILIKE '%{key}%' OR po.state ILIKE '%{key}%') + GROUP BY po.id,p.name + """ + self._cr.execute( + sp_query.format(op_id=company_id, key=key, active=active_qry)) + purchases = self._cr.dictfetchall() + purchase_ids = self.env['purchase.order'].browse( + [i['id'] for i in purchases]) + self.purchase_ids += purchase_ids + + def _search_sale_transactions(self, key, active_qry, company_id): + """ Search for all sale transactions """ + sp_query = """ SELECT sl.id from sale_order sl + LEFT JOIN res_partner p on p.id = sl.partner_id + LEFT JOIN product_pricelist pl ON pl.id = sl.pricelist_id + LEFT JOIN account_payment_term pt ON pt.id = sl.payment_term_id + WHERE sl.company_id = {op_id} AND (sl.name ILIKE '%{key}%' OR + p.name ILIKE '%{key}%' OR sl.state ILIKE '%{key}%' OR + pl.name::text ILIKE '%{key}%') + GROUP BY sl.id,p.name,pl.name,pt.name + """ + self._cr.execute( + sp_query.format(op_id=company_id, key=key, active=active_qry)) + sales = self._cr.dictfetchall() + sale_ids = self.env['sale.order'].browse([i['id'] for i in sales]) + self.sale_ids += sale_ids + + def _search_inventory_transactions(self, key, active_qry, company_id): + """ Search for all inventory transactions """ + sp_query = """ SELECT sp.id from stock_picking sp + LEFT JOIN res_partner p on p.id = sp.partner_id + LEFT JOIN stock_picking_type t ON t.id = sp.picking_type_id + WHERE sp.company_id = {op_id} AND (sp.name ILIKE '%{key}%' OR + p.name ILIKE '%{key}%' OR sp.state ILIKE '%{key}%' OR + t.name::text ILIKE '%{key}%') GROUP BY sp.id,p.name,t.name + """ + self._cr.execute( + sp_query.format(op_id=company_id, key=key, active=active_qry)) + transactions = self._cr.dictfetchall() + transaction_ids = self.env['stock.picking'].browse( + [i['id'] for i in transactions]) + self.transaction_ids += transaction_ids + + def _search_products(self, key, active_qry, company_id): + """ search for products """ + pt_query = """ SELECT pt.id FROM product_template pt + LEFT JOIN product_category pc ON pc.id = pt.categ_id + WHERE (pt.name::text ILIKE '%{key}%' OR + pt.default_code ILIKE '%{key}%' OR pt.type ILIKE '%{key}%' OR + pt.description::text ILIKE '%{key}%' OR pc.name ILIKE '%{key}%') + """ + self._cr.execute(pt_query.format(op_id=company_id, key=key, + active=active_qry).replace( + 'obj', 'pt')) + template_ids = self._cr.dictfetchall() + product_template_ids = self.env['product.template'].browse( + [i['id'] for i in template_ids]) + self.product_ids += product_template_ids + + def _search_customer(self, key, active_qry): + """ search for customer """ + query = """ SELECT r.id from res_partner r WHERE + (r.parent_id is NULL ) AND r.type = 'contact' {active} AND + (r.name ILIKE '%{key}%' OR r.street ILIKE '%{key}%' OR + r.street2 ILIKE '%{key}%' OR r.city ILIKE '%{key}%' OR + r.zip ILIKE '%{key}%' OR r.email ILIKE '%{key}%') """ + query_params = query.format(key=key, active=active_qry).replace( + 'obj', 'r') + self._cr.execute(query_params) + customers = self._cr.dictfetchall() + customer_ids = self.env['res.partner'].browse( + [i['id'] for i in customers]) + self.customer_ids += customer_ids diff --git a/master_search/security/ir.model.access.csv b/master_search/security/ir.model.access.csv new file mode 100755 index 000000000..6fc23818c --- /dev/null +++ b/master_search/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_master_search,access.master.search,model_master_search,base.group_user,1,1,1,1 diff --git a/master_search/security/master_search_security.xml b/master_search/security/master_search_security.xml new file mode 100755 index 000000000..597fc2337 --- /dev/null +++ b/master_search/security/master_search_security.xml @@ -0,0 +1,18 @@ + + + + + Company Search Rule + + [('user_id', '=', user.id)] + + + + Search Rights + 11 + + + Global Search + Global Search Group + + diff --git a/master_search/static/description/assets/cybro-icon.png b/master_search/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/master_search/static/description/assets/cybro-icon.png differ diff --git a/master_search/static/description/assets/cybro-odoo.png b/master_search/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/master_search/static/description/assets/cybro-odoo.png differ diff --git a/master_search/static/description/assets/h2.png b/master_search/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/master_search/static/description/assets/h2.png differ diff --git a/master_search/static/description/assets/icons/arrows-repeat.svg b/master_search/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/master_search/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/banner-1.png b/master_search/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/master_search/static/description/assets/icons/banner-1.png differ diff --git a/master_search/static/description/assets/icons/banner-2.svg b/master_search/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/master_search/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/banner-bg.png b/master_search/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/master_search/static/description/assets/icons/banner-bg.png differ diff --git a/master_search/static/description/assets/icons/banner-bg.svg b/master_search/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/master_search/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/master_search/static/description/assets/icons/banner-call.svg b/master_search/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/master_search/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/master_search/static/description/assets/icons/banner-mail.svg b/master_search/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/master_search/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/master_search/static/description/assets/icons/banner-pattern.svg b/master_search/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/master_search/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/banner-promo.svg b/master_search/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/master_search/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/brand-pair.svg b/master_search/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/master_search/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/check.png b/master_search/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/master_search/static/description/assets/icons/check.png differ diff --git a/master_search/static/description/assets/icons/chevron.png b/master_search/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/master_search/static/description/assets/icons/chevron.png differ diff --git a/master_search/static/description/assets/icons/close-icon.svg b/master_search/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/master_search/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/master_search/static/description/assets/icons/cogs.png b/master_search/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/master_search/static/description/assets/icons/cogs.png differ diff --git a/master_search/static/description/assets/icons/collabarate-icon.svg b/master_search/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/master_search/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/master_search/static/description/assets/icons/consultation.png b/master_search/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/master_search/static/description/assets/icons/consultation.png differ diff --git a/master_search/static/description/assets/icons/cybro-logo.png b/master_search/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/master_search/static/description/assets/icons/cybro-logo.png differ diff --git a/master_search/static/description/assets/icons/down.svg b/master_search/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/master_search/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/master_search/static/description/assets/icons/ecom-black.png b/master_search/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/master_search/static/description/assets/icons/ecom-black.png differ diff --git a/master_search/static/description/assets/icons/education-black.png b/master_search/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/master_search/static/description/assets/icons/education-black.png differ diff --git a/master_search/static/description/assets/icons/faq.png b/master_search/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/master_search/static/description/assets/icons/faq.png differ diff --git a/master_search/static/description/assets/icons/feature-icon.svg b/master_search/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/master_search/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/feature.png b/master_search/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/master_search/static/description/assets/icons/feature.png differ diff --git a/master_search/static/description/assets/icons/gear.svg b/master_search/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/master_search/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/hero.gif b/master_search/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..380654dfe Binary files /dev/null and b/master_search/static/description/assets/icons/hero.gif differ diff --git a/master_search/static/description/assets/icons/hire-odoo.svg b/master_search/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/master_search/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/hotel-black.png b/master_search/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/master_search/static/description/assets/icons/hotel-black.png differ diff --git a/master_search/static/description/assets/icons/license.png b/master_search/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/master_search/static/description/assets/icons/license.png differ diff --git a/master_search/static/description/assets/icons/life-ring-icon.svg b/master_search/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/master_search/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/lifebuoy.png b/master_search/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/master_search/static/description/assets/icons/lifebuoy.png differ diff --git a/master_search/static/description/assets/icons/mail.svg b/master_search/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/master_search/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/master_search/static/description/assets/icons/manufacturing-black.png b/master_search/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/master_search/static/description/assets/icons/manufacturing-black.png differ diff --git a/master_search/static/description/assets/icons/notes.png b/master_search/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/master_search/static/description/assets/icons/notes.png differ diff --git a/master_search/static/description/assets/icons/notification icon.svg b/master_search/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/master_search/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/odoo-consultancy.svg b/master_search/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/master_search/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/master_search/static/description/assets/icons/odoo-licencing.svg b/master_search/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/master_search/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/master_search/static/description/assets/icons/odoo-logo.png b/master_search/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/master_search/static/description/assets/icons/odoo-logo.png differ diff --git a/master_search/static/description/assets/icons/patter.svg b/master_search/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/master_search/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/master_search/static/description/assets/icons/pattern1.png b/master_search/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/master_search/static/description/assets/icons/pattern1.png differ diff --git a/master_search/static/description/assets/icons/pos-black.png b/master_search/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/master_search/static/description/assets/icons/pos-black.png differ diff --git a/master_search/static/description/assets/icons/puzzle-piece-icon.svg b/master_search/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/master_search/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/puzzle.png b/master_search/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/master_search/static/description/assets/icons/puzzle.png differ diff --git a/master_search/static/description/assets/icons/replace-icon.svg b/master_search/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/master_search/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/restaurant-black.png b/master_search/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/master_search/static/description/assets/icons/restaurant-black.png differ diff --git a/master_search/static/description/assets/icons/screenshot-main.png b/master_search/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/master_search/static/description/assets/icons/screenshot-main.png differ diff --git a/master_search/static/description/assets/icons/screenshot.png b/master_search/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/master_search/static/description/assets/icons/screenshot.png differ diff --git a/master_search/static/description/assets/icons/service-black.png b/master_search/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/master_search/static/description/assets/icons/service-black.png differ diff --git a/master_search/static/description/assets/icons/skype-fill.svg b/master_search/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/master_search/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/skype.png b/master_search/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/master_search/static/description/assets/icons/skype.png differ diff --git a/master_search/static/description/assets/icons/skype.svg b/master_search/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/master_search/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/master_search/static/description/assets/icons/star-1.svg b/master_search/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/master_search/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/star-2.svg b/master_search/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/master_search/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/master_search/static/description/assets/icons/support.png b/master_search/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/master_search/static/description/assets/icons/support.png differ diff --git a/master_search/static/description/assets/icons/test-1 - Copy.png b/master_search/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/master_search/static/description/assets/icons/test-1 - Copy.png differ diff --git a/master_search/static/description/assets/icons/test-1.png b/master_search/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/master_search/static/description/assets/icons/test-1.png differ diff --git a/master_search/static/description/assets/icons/test-2.png b/master_search/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/master_search/static/description/assets/icons/test-2.png differ diff --git a/master_search/static/description/assets/icons/trading-black.png b/master_search/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/master_search/static/description/assets/icons/trading-black.png differ diff --git a/master_search/static/description/assets/icons/training.png b/master_search/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/master_search/static/description/assets/icons/training.png differ diff --git a/master_search/static/description/assets/icons/translate.svg b/master_search/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/master_search/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/update.png b/master_search/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/master_search/static/description/assets/icons/update.png differ diff --git a/master_search/static/description/assets/icons/user.png b/master_search/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/master_search/static/description/assets/icons/user.png differ diff --git a/master_search/static/description/assets/icons/video.png b/master_search/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/master_search/static/description/assets/icons/video.png differ diff --git a/master_search/static/description/assets/icons/whatsapp.png b/master_search/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/master_search/static/description/assets/icons/whatsapp.png differ diff --git a/master_search/static/description/assets/icons/wrench-icon.svg b/master_search/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/master_search/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/master_search/static/description/assets/icons/wrench.png b/master_search/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/master_search/static/description/assets/icons/wrench.png differ diff --git a/master_search/static/description/assets/modules/1.gif b/master_search/static/description/assets/modules/1.gif new file mode 100644 index 000000000..dc180280d Binary files /dev/null and b/master_search/static/description/assets/modules/1.gif differ diff --git a/master_search/static/description/assets/modules/2.png b/master_search/static/description/assets/modules/2.png new file mode 100644 index 000000000..ecea68d98 Binary files /dev/null and b/master_search/static/description/assets/modules/2.png differ diff --git a/master_search/static/description/assets/modules/3.png b/master_search/static/description/assets/modules/3.png new file mode 100644 index 000000000..e0b09a5a0 Binary files /dev/null and b/master_search/static/description/assets/modules/3.png differ diff --git a/master_search/static/description/assets/modules/4.jpg b/master_search/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..4bd9278e3 Binary files /dev/null and b/master_search/static/description/assets/modules/4.jpg differ diff --git a/master_search/static/description/assets/modules/5.jpg b/master_search/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..31a56b08c Binary files /dev/null and b/master_search/static/description/assets/modules/5.jpg differ diff --git a/master_search/static/description/assets/modules/6.png b/master_search/static/description/assets/modules/6.png new file mode 100644 index 000000000..17089cab4 Binary files /dev/null and b/master_search/static/description/assets/modules/6.png differ diff --git a/master_search/static/description/assets/screenshots/1.png b/master_search/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..1da286831 Binary files /dev/null and b/master_search/static/description/assets/screenshots/1.png differ diff --git a/master_search/static/description/assets/screenshots/2.png b/master_search/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..1a472641e Binary files /dev/null and b/master_search/static/description/assets/screenshots/2.png differ diff --git a/master_search/static/description/assets/screenshots/3.png b/master_search/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..ec88790be Binary files /dev/null and b/master_search/static/description/assets/screenshots/3.png differ diff --git a/master_search/static/description/assets/screenshots/4.png b/master_search/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..d30cd6def Binary files /dev/null and b/master_search/static/description/assets/screenshots/4.png differ diff --git a/master_search/static/description/assets/screenshots/5.png b/master_search/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..cfded6d65 Binary files /dev/null and b/master_search/static/description/assets/screenshots/5.png differ diff --git a/master_search/static/description/assets/screenshots/6.png b/master_search/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..477d41c24 Binary files /dev/null and b/master_search/static/description/assets/screenshots/6.png differ diff --git a/master_search/static/description/assets/screenshots/7.png b/master_search/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..c5457fb6f Binary files /dev/null and b/master_search/static/description/assets/screenshots/7.png differ diff --git a/master_search/static/description/assets/screenshots/8.png b/master_search/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..ffe44985f Binary files /dev/null and b/master_search/static/description/assets/screenshots/8.png differ diff --git a/master_search/static/description/assets/screenshots/9.png b/master_search/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..97d1c1d7f Binary files /dev/null and b/master_search/static/description/assets/screenshots/9.png differ diff --git a/master_search/static/description/assets/screenshots/hero.gif b/master_search/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..db4d0af43 Binary files /dev/null and b/master_search/static/description/assets/screenshots/hero.gif differ diff --git a/master_search/static/description/assets/y18.jpg b/master_search/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/master_search/static/description/assets/y18.jpg differ diff --git a/master_search/static/description/banner.png b/master_search/static/description/banner.png new file mode 100644 index 000000000..35396bdf0 Binary files /dev/null and b/master_search/static/description/banner.png differ diff --git a/master_search/static/description/icon.png b/master_search/static/description/icon.png new file mode 100644 index 000000000..4abd0c2dd Binary files /dev/null and b/master_search/static/description/icon.png differ diff --git a/master_search/static/description/index.html b/master_search/static/description/index.html new file mode 100644 index 000000000..508efe621 --- /dev/null +++ b/master_search/static/description/index.html @@ -0,0 +1,1169 @@ + + + + + + Global Search + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ Effortless Search for Customers, Products, Sales, Purchase, + Inventory and Accounting modules records. +

+

Global Search +

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

Key + Highlights

+
+
+
+
+ +
+
+ Advanced Search +
+

+ Users can search the records in Customers, Products, + Sale, Purchase, Inventory and Accounting Modules. +

+
+
+
+
+
+ +
+
+ Search Module +
+

+ This new module helps to search using different + attributes like name, reference, number etc. + in different modules. +

+
+
+
+
+ +
+
+
+ Global Search +

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

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Enable + + Global Search +

+
+
+

+ Go to Settings --> Users & Companies --> Other + enable 'Global Search'. +

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

+ Search + + Module +

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

+ Search in + All Data +

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

+ Search in + + Customer Data +

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

+ Search in + + Product Data +

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

+ Search in + + Sale Data +

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

+ Search in + + Purchase Data +

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

+ Search in + + Inventory Data +

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

+ Search in + + Accounting Data +

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

+ Dynamic Search View Option.

+
+ +
+
+
+
+
+
+ +
+

+ Possible to Search with Different Attributes like Name, Reference, Number etc.

+
+
+
+
+
+
+
+ +
+

+ Easily Search Records in Customers, Products, Sale, Purchase, Inventory and Accounting Data.

+
+
+
+
+
+
+
+ +
+

+ View Recent Searches.

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

+ While configuring a + backup, selecting + the Zip option will + include the + filestore in the + backup, while + choosing the Dump + option will create a + backup without the + filestore. +

+
+
+ +
+ +
+

+ Enable the "Remove + Old Backups" option + in the backup + creation view to + automatically delete + previous backups + based on the number + of days specified. +

+
+
+ +
+ +
+

+ Enable the "Notify + User" option and + specify a contact to + receive an email + containing a + detailed report with + the failure reason + and backup details. + This option will + also send an email + upon successful + backup. +

+
+
+ +
+ +
+

+ Select the backup + destination as local + storage and specify + a backup path to a + location on the + system to create + backups on your own + system. +

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

+ Latest Release 18.0.1.0.0 +

+ + 30th November, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/master_search/static/src/js/master_search.js b/master_search/static/src/js/master_search.js new file mode 100644 index 000000000..9efcfff90 --- /dev/null +++ b/master_search/static/src/js/master_search.js @@ -0,0 +1,119 @@ +/** @odoo-module **/ +import { formView } from '@web/views/form/form_view'; +import { registry } from "@web/core/registry"; +import { FormRenderer } from "@web/views/form/form_renderer"; +import { FormController } from "@web/views/form/form_controller"; +import { useEffect, useExternalListener } from "@odoo/owl"; +export class MasterSearch extends FormController { + setup() { + super.setup(); + useEffect(() => { + const expandElements = document.querySelectorAll('.expand_tile') + const background = document.querySelector('.oe_search_bgnd') + const RadioBtns = document.querySelectorAll('.o_radio_input') + if (background.length > 0) { + document.title = 'Search'; + } + expandElements.forEach((element) => { + element.addEventListener("click", this.clickedExpandTile) + }) + RadioBtns.forEach((element) => { + element.addEventListener("change", this.onChangeRadioBtn) + }) + return () => { + expandElements.forEach((element) => { + element.removeEventListener("click", this.clickedExpandTile) + }) + RadioBtns.forEach((element) => { + element.removeEventListener("change", this.onChangeRadioBtn) + }) + } + }) + } + clickedExpandTile(e) { + var resultDiv = this.closest('.oe_result_div') + var element = resultDiv.querySelector('.oe_details_list') + if (element.style.display === "none" || element.style.display === "") { + console.log("block") + element.style.display = "block"; + } else { + console.log("none") + element.style.display = "none"; + } + } + onChangeRadioBtn(e) { + let targetEl = this.dataset.value; + const treeEls = document.querySelectorAll('.oe_details_list') + treeEls.forEach((element) => { + if (element.style.display === "none" || element.style.display === "") { + element.classList.remove('oe_details_list--show'); + } else { + element.classList.add('d-none'); + } + }); + const searchTabs = document.querySelectorAll('.oe_search_tab') + switch(targetEl){ + case 'customer': + searchTabs.forEach((el) => { + el.classList.add('d-none'); + }) + const customerResult = document.querySelector('#customer_search_results') + customerResult.classList.add('d-block'); + customerResult.classList.remove('d-none'); + break; + case 'product': + searchTabs.forEach((el) => { + el.classList.add('d-none'); + }) + const productResult = document.querySelector('#product_search_results') + productResult.classList.add('d-block'); + productResult.classList.remove('d-none'); + break; + case 'transaction details': + searchTabs.forEach((el) => { + el.classList.add('d-none'); + }) + const TransactionResult = document.querySelector('#inventory_search_results') + TransactionResult.classList.add('d-block'); + TransactionResult.classList.remove('d-none'); + break; + case 'sale details': + searchTabs.forEach((el) => { + el.classList.add('d-none'); + }) + const SaleResult = document.querySelector('#sale_search_results') + SaleResult.classList.add('d-block'); + SaleResult.classList.remove('d-none'); + break; + case 'purchase details': + searchTabs.forEach((el) => { + el.classList.add('d-none'); + }) + const PurchaseResult = document.querySelector('#purchase_search_results') + PurchaseResult.classList.add('d-block'); + PurchaseResult.classList.remove('d-none'); + break; + case 'account details': + searchTabs.forEach((el) => { + el.classList.add('d-none'); + }) + const AccountResult = document.querySelector('#accounting_search_results') + AccountResult.classList.add('d-block'); + AccountResult.classList.remove('d-none'); + break; + case 'any': + searchTabs.forEach((el) => { + el.classList.remove('d-none'); + }) + break; + } + const RecentSearch = document.querySelector('#recent_searches') + RecentSearch.classList.add('d-block'); + RecentSearch.classList.remove('d-none'); + } +} +export const MasterSearchClass = { + ...formView, + Controller: MasterSearch, +}; +registry.category("views").add("master_search", MasterSearchClass); diff --git a/master_search/static/src/scss/master_search.scss b/master_search/static/src/scss/master_search.scss new file mode 100644 index 000000000..e26105634 --- /dev/null +++ b/master_search/static/src/scss/master_search.scss @@ -0,0 +1,36 @@ +.oe_search_tab{ + cursor: pointer; + transition: .2s; + &:hover { + background-color: #7c7bad !important; + } +} +.oe_details_list{ + display: none; +} + +.oe_details_tree--show{ + display: block !important; +} + +.btn_master_search{ + display: inline-block; + background-color:#5f5e97; + color:#fff !important; + color: #fff;margin-left: 1px; + margin-top: -1px; +} +.btn_master_search:hover{ + background-color: rgb(255, 255, 255) !important; + color: rgb(61, 155, 187) !important; +} +.not-allowed{ + color: #d94242; + border: 1px solid #ea9292; + border-radius: 5px; + background-color: #f9e7e7; + padding: 1px 55px; + width: 370px; + margin-bottom: 5px; + display: none; +} diff --git a/master_search/views/master_search_view.xml b/master_search/views/master_search_view.xml new file mode 100644 index 000000000..774349d52 --- /dev/null +++ b/master_search/views/master_search_view.xml @@ -0,0 +1,298 @@ + + + + + Search + master.search + +
+ + +
+
+
+
+
+
+
+
+
+
+ Recent Searches +
+ + Records Found + + + +
+
+
+ + + + + +
+
+
+
+ Customer Search Results +
+ + Records Found + + + +
+
+
+ + + + + + +
+
+
+
+ Product Search Results +
+ + Records Found + + + +
+
+
+ + + + + + + + + + + +
+
+
+
+ Inventory Search Results +
+ + Records Found + + + +
+
+
+ + + + + + + + + +
+
+
+
+ Sale Search Results +
+ + Records Found + + + +
+
+
+ + + + + + + + + +
+
+
+
+ Purchase Search Results +
+ + Records Found + + + +
+
+
+ + + + + + + +
+
+
+
+ Accounting Search Results +
+ + Records Found + + + +
+
+
+ + + + + + + +
+
+
+ +
+
+ + + Search + master.search + form + {'active_test': False, + 'search_default_filter_active': 1} + + + + +