diff --git a/list_tree_pin_records/README.rst b/list_tree_pin_records/README.rst new file mode 100644 index 000000000..8ffd7c839 --- /dev/null +++ b/list_tree_pin_records/README.rst @@ -0,0 +1,52 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Pin Records In Tree/List View +============================= +* Pin Records In Tree/List View module is used to Pin Records in Top of the +Table. + +Configuration +============= +No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: + (V16) Afra M P @cybrosys, + (V17) Jumana Haseen, + (V18) Bhagyadev KP, +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/list_tree_pin_records/__init__.py b/list_tree_pin_records/__init__.py new file mode 100644 index 000000000..7a4467bb9 --- /dev/null +++ b/list_tree_pin_records/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 . +# +################################################################################ +from . import models diff --git a/list_tree_pin_records/__manifest__.py b/list_tree_pin_records/__manifest__.py new file mode 100644 index 000000000..ecc8bda0e --- /dev/null +++ b/list_tree_pin_records/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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': "Pin Records In Tree/List View", + 'version': '18.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """Pin Records In Tree/List View module is used to Pin Records + in Top of the Table.""", + 'description': """This module helps to Pin and Unpin records in Top + of the Table.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base'], + 'data': [ + 'security/ir.model.access.csv' + ], + 'assets': { + 'web.assets_backend': [ + 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js', + 'list_tree_pin_records/static/src/**/web/**/*', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/list_tree_pin_records/doc/RELEASE_NOTES.md b/list_tree_pin_records/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..3ecfc8d29 --- /dev/null +++ b/list_tree_pin_records/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 20.11.2024 +#### Version 18.0.1.0.0 +#### ADD +- Initial commit for Pin Records In Tree/List View diff --git a/list_tree_pin_records/models/__init__.py b/list_tree_pin_records/models/__init__.py new file mode 100644 index 000000000..a87110d8a --- /dev/null +++ b/list_tree_pin_records/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 . +# +################################################################################ +from . import pin_records diff --git a/list_tree_pin_records/models/pin_records.py b/list_tree_pin_records/models/pin_records.py new file mode 100644 index 000000000..005183e22 --- /dev/null +++ b/list_tree_pin_records/models/pin_records.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Bhagyadev KP () +# +# 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 . +# +################################################################################ +from odoo import api, fields, models + + +class PinRecord(models.Model): + """Class is used to store pinned recodes in the database""" + _name = 'pin.records' + _description = 'Pin Records' + + record_id = fields.Integer(string="Record Id", help='Record id') + res_model = fields.Char(string="Model", help='Corresponding model') + color = fields.Char(string="Color", help='Color code') + user_id = fields.Many2one('res.users', string='User', + help="Set current user") + + @api.model + def save_pin_record(self, pin_model): + """Function to fetch data from XML""" + record = self.search([('record_id', '=', pin_model[0]), ('res_model', '=', pin_model[1])]) + if record: + record.unlink() + else: + self.create({ + 'record_id': pin_model[0], + 'res_model': pin_model[1], + 'color': pin_model[2], + 'user_id': self.env.uid + }) + result = self.search([('res_model', '=', pin_model)]) + return result + + @api.model + def pin_record(self, pin_model): + """Function to fetch id and color of the specified model""" + pinned_record = [] + record_ids = self.search([('res_model', '=', pin_model), + ('user_id', '=', self.env.uid)]) + for record_id in record_ids: + pinned_record.append({ + 'id': record_id.record_id, + 'color': record_id.color, + 'model': record_id.res_model + }) + return pinned_record diff --git a/list_tree_pin_records/security/ir.model.access.csv b/list_tree_pin_records/security/ir.model.access.csv new file mode 100644 index 000000000..b160c181d --- /dev/null +++ b/list_tree_pin_records/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_pin_records_user,pin.records.user,model_pin_records,base.group_user,1,1,1,1 diff --git a/list_tree_pin_records/static/description/assets/cybro-icon.png b/list_tree_pin_records/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/list_tree_pin_records/static/description/assets/cybro-icon.png differ diff --git a/list_tree_pin_records/static/description/assets/cybro-odoo.png b/list_tree_pin_records/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/cybro-odoo.png differ diff --git a/list_tree_pin_records/static/description/assets/h2.png b/list_tree_pin_records/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/list_tree_pin_records/static/description/assets/h2.png differ diff --git a/list_tree_pin_records/static/description/assets/icons/arrows-repeat.svg b/list_tree_pin_records/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/banner-1.png b/list_tree_pin_records/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/banner-2.svg b/list_tree_pin_records/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/banner-bg.png b/list_tree_pin_records/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/banner-bg.svg b/list_tree_pin_records/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/banner-call.svg b/list_tree_pin_records/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/banner-mail.svg b/list_tree_pin_records/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/banner-pattern.svg b/list_tree_pin_records/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/banner-promo.svg b/list_tree_pin_records/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/brand-pair.svg b/list_tree_pin_records/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/check.png b/list_tree_pin_records/static/description/assets/icons/check.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/chevron.png b/list_tree_pin_records/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/close-icon.svg b/list_tree_pin_records/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/cogs.png b/list_tree_pin_records/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/collabarate-icon.svg b/list_tree_pin_records/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/list_tree_pin_records/static/description/assets/icons/consultation.png b/list_tree_pin_records/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/cybro-logo.png b/list_tree_pin_records/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/down.svg b/list_tree_pin_records/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/list_tree_pin_records/static/description/assets/icons/ecom-black.png b/list_tree_pin_records/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/education-black.png b/list_tree_pin_records/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/faq.png b/list_tree_pin_records/static/description/assets/icons/faq.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/feature-icon.svg b/list_tree_pin_records/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/feature.png b/list_tree_pin_records/static/description/assets/icons/feature.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/gear.svg b/list_tree_pin_records/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/hero.gif b/list_tree_pin_records/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/hire-odoo.svg b/list_tree_pin_records/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/hotel-black.png b/list_tree_pin_records/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/license.png b/list_tree_pin_records/static/description/assets/icons/license.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/life-ring-icon.svg b/list_tree_pin_records/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/lifebuoy.png b/list_tree_pin_records/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/mail.svg b/list_tree_pin_records/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/list_tree_pin_records/static/description/assets/icons/manufacturing-black.png b/list_tree_pin_records/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/notes.png b/list_tree_pin_records/static/description/assets/icons/notes.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/notification icon.svg b/list_tree_pin_records/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/odoo-consultancy.svg b/list_tree_pin_records/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/odoo-licencing.svg b/list_tree_pin_records/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/list_tree_pin_records/static/description/assets/icons/odoo-logo.png b/list_tree_pin_records/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/patter.svg b/list_tree_pin_records/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/pattern1.png b/list_tree_pin_records/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/pos-black.png b/list_tree_pin_records/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/puzzle-piece-icon.svg b/list_tree_pin_records/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/puzzle.png b/list_tree_pin_records/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/replace-icon.svg b/list_tree_pin_records/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/restaurant-black.png b/list_tree_pin_records/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/screenshot-main.png b/list_tree_pin_records/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/screenshot.png b/list_tree_pin_records/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/service-black.png b/list_tree_pin_records/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/skype-fill.svg b/list_tree_pin_records/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/skype.png b/list_tree_pin_records/static/description/assets/icons/skype.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/skype.svg b/list_tree_pin_records/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/list_tree_pin_records/static/description/assets/icons/star-1.svg b/list_tree_pin_records/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/star-2.svg b/list_tree_pin_records/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/support.png b/list_tree_pin_records/static/description/assets/icons/support.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/test-1 - Copy.png b/list_tree_pin_records/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/test-1.png b/list_tree_pin_records/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/test-2.png b/list_tree_pin_records/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/trading-black.png b/list_tree_pin_records/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/training.png b/list_tree_pin_records/static/description/assets/icons/training.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/translate.svg b/list_tree_pin_records/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/update.png b/list_tree_pin_records/static/description/assets/icons/update.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/user.png b/list_tree_pin_records/static/description/assets/icons/user.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/video.png b/list_tree_pin_records/static/description/assets/icons/video.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/whatsapp.png b/list_tree_pin_records/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/icons/wrench-icon.svg b/list_tree_pin_records/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/list_tree_pin_records/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/list_tree_pin_records/static/description/assets/icons/wrench.png b/list_tree_pin_records/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/assets/modules/1.gif b/list_tree_pin_records/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/modules/1.gif differ diff --git a/list_tree_pin_records/static/description/assets/modules/2.gif b/list_tree_pin_records/static/description/assets/modules/2.gif new file mode 100644 index 000000000..d19e2b352 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/modules/2.gif differ diff --git a/list_tree_pin_records/static/description/assets/modules/3.png b/list_tree_pin_records/static/description/assets/modules/3.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/list_tree_pin_records/static/description/assets/modules/3.png differ diff --git a/list_tree_pin_records/static/description/assets/modules/4.png b/list_tree_pin_records/static/description/assets/modules/4.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/modules/4.png differ diff --git a/list_tree_pin_records/static/description/assets/modules/5.png b/list_tree_pin_records/static/description/assets/modules/5.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/modules/5.png differ diff --git a/list_tree_pin_records/static/description/assets/modules/6.jpg b/list_tree_pin_records/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/modules/6.jpg differ diff --git a/list_tree_pin_records/static/description/assets/screenshots/1.png b/list_tree_pin_records/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..72bc5dfa1 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/screenshots/1.png differ diff --git a/list_tree_pin_records/static/description/assets/screenshots/2.png b/list_tree_pin_records/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..78aed09d0 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/screenshots/2.png differ diff --git a/list_tree_pin_records/static/description/assets/screenshots/3.png b/list_tree_pin_records/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..6a8ea8f21 Binary files /dev/null and b/list_tree_pin_records/static/description/assets/screenshots/3.png differ diff --git a/list_tree_pin_records/static/description/assets/screenshots/hero.gif b/list_tree_pin_records/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..c9403c3ab Binary files /dev/null and b/list_tree_pin_records/static/description/assets/screenshots/hero.gif differ diff --git a/list_tree_pin_records/static/description/assets/y18.jpg b/list_tree_pin_records/static/description/assets/y18.jpg new file mode 100644 index 000000000..e69de29bb diff --git a/list_tree_pin_records/static/description/banner.jpg b/list_tree_pin_records/static/description/banner.jpg new file mode 100644 index 000000000..fdfe946cd Binary files /dev/null and b/list_tree_pin_records/static/description/banner.jpg differ diff --git a/list_tree_pin_records/static/description/icon.png b/list_tree_pin_records/static/description/icon.png new file mode 100644 index 000000000..cd99aae34 Binary files /dev/null and b/list_tree_pin_records/static/description/icon.png differ diff --git a/list_tree_pin_records/static/description/index.html b/list_tree_pin_records/static/description/index.html new file mode 100644 index 000000000..898d59d5d --- /dev/null +++ b/list_tree_pin_records/static/description/index.html @@ -0,0 +1,825 @@ + + + + + + Pin Records In Tree/List View + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+ + + + +
+
+ +
+
+
+
+

+ This Module Helps To Pin Records In Tree/List View. +

+

Pin Records In Tree/List View +

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

Key + Highlights

+
+
+
+
+ +
+
+ +Pin Records in Top of the Table. +
+
+
+
+
+
+ +
+
+ Pin records in the tree/list view. +
+
+
+
+
+ +
+
+
+ Pin Records In Tree/List View +

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

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

+ + +

+
+
+

Added a pin in all tree/list view. +

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

+ + +

+
+
+

Pinned records view at the top of the table. +

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

+ + +

+
+
+

Click the pinned record it will unpin the record. +

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

Pinned Recodes View at The top of the Table.

+
+
+
+
+
+
+
+ +
+

Pin records in the tree/list view.

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

Yes it available. +

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

+ Latest Release 18.0.1.0.0 +

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

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/list_tree_pin_records/static/src/views/web/pin_list_views.xml b/list_tree_pin_records/static/src/views/web/pin_list_views.xml new file mode 100644 index 000000000..67a879490 --- /dev/null +++ b/list_tree_pin_records/static/src/views/web/pin_list_views.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_tree_pin_records/static/src/views/web/pin_records.js b/list_tree_pin_records/static/src/views/web/pin_records.js new file mode 100644 index 000000000..872193448 --- /dev/null +++ b/list_tree_pin_records/static/src/views/web/pin_records.js @@ -0,0 +1,58 @@ +import { patch } from "@web/core/utils/patch"; +import { ListRenderer } from "@web/views/list/list_renderer"; +import { onMounted } from "@odoo/owl"; +import { useService } from "@web/core/utils/hooks"; +var array = [] +var int + +//Patching ListRenderer +patch(ListRenderer.prototype, { + setup() { + super.setup(...arguments); + this.orm = useService("orm"); + onMounted(this.pin) + }, +// pin function to pin records + async pin(){ + var current_model = this.props.list.model.env.searchModel.resModel + var table_row = $('.o_data_row') + var row = this.props.list.records + var result = await this.orm.call('pin.records', 'pin_record',[current_model]) + if (result){ + for (var num=0;num<=table_row.length-1;num++){ + var row_id = row[num].resId + for (var i=0;i<=result.length-1;i++){ + array.push({'id':result[i].id}) + if (row_id == result[i].id){ + if(row[num].resModel == result[i].model){ + table_row[num].style.setProperty('--table-bg', '#4AEBC8'); + table_row[num].parentNode.insertBefore(table_row[num],table_row[0]) + } + } + } + } + }; + }, + async pin_record_details(ev,record){ + var row = $(event.target).parent().parent()[0] + var num = 0 + array.forEach(function(line,index){ + if(line.id == record.resId){ + row.style.setProperty('--table-bg', 'white'); + int = index + num = 1 + } + }); + if(num==1){ + array.splice(int,1) + this.actionService.doAction('soft_reload'); + } + if(num==0) { + $($(event.target).parent().parent().parent()[0]).prepend(row) + array.push({'id': record.resId}) + row.style.setProperty('--table-bg', '#4AEBC8'); + } + var self = this; + var result = await this.orm.call('pin.records', 'save_pin_record',[[parseInt(record.resId),record.resModel,row.style.backgroundColor]]) + } +});