diff --git a/custom_list_view/README.rst b/custom_list_view/README.rst new file mode 100644 index 000000000..5fb6bb857 --- /dev/null +++ b/custom_list_view/README.rst @@ -0,0 +1,15 @@ +Custom List View V16 +==================== + +This module will helps to show row number, fixed header, duplicate record and highlight selected record in list view + + +Credits +======= +Cybrosys Techno Solutions + +Author +------ +* Cybrosys Techno Solutions + Aiswarya J P @ Cybro V15 + Rosmy John @ Cybro V16 diff --git a/custom_list_view/__init__.py b/custom_list_view/__init__.py new file mode 100644 index 000000000..e2604cae1 --- /dev/null +++ b/custom_list_view/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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/custom_list_view/__manifest__.py b/custom_list_view/__manifest__.py new file mode 100644 index 000000000..51b4fefc8 --- /dev/null +++ b/custom_list_view/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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': 'Custom List View', + 'version': '16.0.1.0.0', + 'summary': 'Helps to Show Row Number, Fixed Header, Duplicate Record and Highlight Selected Record in List View', + 'description': 'Helps to Show Row Number, Fixed Header, Duplicate Record and Highlight Selected Record in List View', + 'category': 'Tools', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'license': 'LGPL-3', + 'images': ['static/description/banner.png'], + 'depends': ['base'], + 'assets': { + 'web.assets_backend': [ + 'custom_list_view/static/src/js/duplicate_record.js', + 'custom_list_view/static/src/js/record_highlight.js', + 'custom_list_view/static/src/css/sticky_header.css', + 'custom_list_view/static/src/css/highlight.css', + 'custom_list_view/static/src/xml/record_highlight.xml' + ], + }, + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/custom_list_view/doc/RELEASE_NOTES.md b/custom_list_view/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..6614bb0be --- /dev/null +++ b/custom_list_view/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module + +#### 14.02.2023 +#### Version 16.0.1.0.0 +#### ADD Initial Commit for custom_list_view diff --git a/custom_list_view/static/description/assets/icons/check.png b/custom_list_view/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/custom_list_view/static/description/assets/icons/check.png differ diff --git a/custom_list_view/static/description/assets/icons/chevron.png b/custom_list_view/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/custom_list_view/static/description/assets/icons/chevron.png differ diff --git a/custom_list_view/static/description/assets/icons/cogs.png b/custom_list_view/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/custom_list_view/static/description/assets/icons/cogs.png differ diff --git a/custom_list_view/static/description/assets/icons/consultation.png b/custom_list_view/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/custom_list_view/static/description/assets/icons/consultation.png differ diff --git a/custom_list_view/static/description/assets/icons/ecom-black.png b/custom_list_view/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/custom_list_view/static/description/assets/icons/ecom-black.png differ diff --git a/custom_list_view/static/description/assets/icons/education-black.png b/custom_list_view/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/custom_list_view/static/description/assets/icons/education-black.png differ diff --git a/custom_list_view/static/description/assets/icons/hotel-black.png b/custom_list_view/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/custom_list_view/static/description/assets/icons/hotel-black.png differ diff --git a/custom_list_view/static/description/assets/icons/license.png b/custom_list_view/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/custom_list_view/static/description/assets/icons/license.png differ diff --git a/custom_list_view/static/description/assets/icons/lifebuoy.png b/custom_list_view/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/custom_list_view/static/description/assets/icons/lifebuoy.png differ diff --git a/custom_list_view/static/description/assets/icons/manufacturing-black.png b/custom_list_view/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/custom_list_view/static/description/assets/icons/manufacturing-black.png differ diff --git a/custom_list_view/static/description/assets/icons/pos-black.png b/custom_list_view/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/custom_list_view/static/description/assets/icons/pos-black.png differ diff --git a/custom_list_view/static/description/assets/icons/puzzle.png b/custom_list_view/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/custom_list_view/static/description/assets/icons/puzzle.png differ diff --git a/custom_list_view/static/description/assets/icons/restaurant-black.png b/custom_list_view/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/custom_list_view/static/description/assets/icons/restaurant-black.png differ diff --git a/custom_list_view/static/description/assets/icons/service-black.png b/custom_list_view/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/custom_list_view/static/description/assets/icons/service-black.png differ diff --git a/custom_list_view/static/description/assets/icons/trading-black.png b/custom_list_view/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/custom_list_view/static/description/assets/icons/trading-black.png differ diff --git a/custom_list_view/static/description/assets/icons/training.png b/custom_list_view/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/custom_list_view/static/description/assets/icons/training.png differ diff --git a/custom_list_view/static/description/assets/icons/update.png b/custom_list_view/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/custom_list_view/static/description/assets/icons/update.png differ diff --git a/custom_list_view/static/description/assets/icons/user.png b/custom_list_view/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/custom_list_view/static/description/assets/icons/user.png differ diff --git a/custom_list_view/static/description/assets/icons/wrench.png b/custom_list_view/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/custom_list_view/static/description/assets/icons/wrench.png differ diff --git a/custom_list_view/static/description/assets/misc/categories.png b/custom_list_view/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/categories.png differ diff --git a/custom_list_view/static/description/assets/misc/check-box.png b/custom_list_view/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/check-box.png differ diff --git a/custom_list_view/static/description/assets/misc/compass.png b/custom_list_view/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/custom_list_view/static/description/assets/misc/compass.png differ diff --git a/custom_list_view/static/description/assets/misc/corporate.png b/custom_list_view/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/custom_list_view/static/description/assets/misc/corporate.png differ diff --git a/custom_list_view/static/description/assets/misc/customer-support.png b/custom_list_view/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/custom_list_view/static/description/assets/misc/customer-support.png differ diff --git a/custom_list_view/static/description/assets/misc/cybrosys-logo.png b/custom_list_view/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/custom_list_view/static/description/assets/misc/cybrosys-logo.png differ diff --git a/custom_list_view/static/description/assets/misc/features.png b/custom_list_view/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/features.png differ diff --git a/custom_list_view/static/description/assets/misc/logo.png b/custom_list_view/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/custom_list_view/static/description/assets/misc/logo.png differ diff --git a/custom_list_view/static/description/assets/misc/pictures.png b/custom_list_view/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/pictures.png differ diff --git a/custom_list_view/static/description/assets/misc/pie-chart.png b/custom_list_view/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/pie-chart.png differ diff --git a/custom_list_view/static/description/assets/misc/right-arrow.png b/custom_list_view/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/right-arrow.png differ diff --git a/custom_list_view/static/description/assets/misc/star.png b/custom_list_view/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/custom_list_view/static/description/assets/misc/star.png differ diff --git a/custom_list_view/static/description/assets/misc/support.png b/custom_list_view/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/support.png differ diff --git a/custom_list_view/static/description/assets/misc/whatsapp.png b/custom_list_view/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/custom_list_view/static/description/assets/misc/whatsapp.png differ diff --git a/custom_list_view/static/description/assets/modules/1.png b/custom_list_view/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/custom_list_view/static/description/assets/modules/1.png differ diff --git a/custom_list_view/static/description/assets/modules/2.png b/custom_list_view/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/custom_list_view/static/description/assets/modules/2.png differ diff --git a/custom_list_view/static/description/assets/modules/3.png b/custom_list_view/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/custom_list_view/static/description/assets/modules/3.png differ diff --git a/custom_list_view/static/description/assets/modules/4.png b/custom_list_view/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/custom_list_view/static/description/assets/modules/4.png differ diff --git a/custom_list_view/static/description/assets/modules/5.gif b/custom_list_view/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/custom_list_view/static/description/assets/modules/5.gif differ diff --git a/custom_list_view/static/description/assets/modules/6.png b/custom_list_view/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/custom_list_view/static/description/assets/modules/6.png differ diff --git a/custom_list_view/static/description/assets/screenshots/duplicate_record.png b/custom_list_view/static/description/assets/screenshots/duplicate_record.png new file mode 100644 index 000000000..5b9d4d16f Binary files /dev/null and b/custom_list_view/static/description/assets/screenshots/duplicate_record.png differ diff --git a/custom_list_view/static/description/assets/screenshots/hero.gif b/custom_list_view/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5f1570259 Binary files /dev/null and b/custom_list_view/static/description/assets/screenshots/hero.gif differ diff --git a/custom_list_view/static/description/assets/screenshots/highlight_record.png b/custom_list_view/static/description/assets/screenshots/highlight_record.png new file mode 100644 index 000000000..52917b10a Binary files /dev/null and b/custom_list_view/static/description/assets/screenshots/highlight_record.png differ diff --git a/custom_list_view/static/description/assets/screenshots/row_number.png b/custom_list_view/static/description/assets/screenshots/row_number.png new file mode 100644 index 000000000..36406feb8 Binary files /dev/null and b/custom_list_view/static/description/assets/screenshots/row_number.png differ diff --git a/custom_list_view/static/description/assets/screenshots/sticky_header.png b/custom_list_view/static/description/assets/screenshots/sticky_header.png new file mode 100644 index 000000000..e39baaeb6 Binary files /dev/null and b/custom_list_view/static/description/assets/screenshots/sticky_header.png differ diff --git a/custom_list_view/static/description/banner.png b/custom_list_view/static/description/banner.png new file mode 100644 index 000000000..05f58a9b2 Binary files /dev/null and b/custom_list_view/static/description/banner.png differ diff --git a/custom_list_view/static/description/icon.png b/custom_list_view/static/description/icon.png new file mode 100644 index 000000000..e3d8f201b Binary files /dev/null and b/custom_list_view/static/description/icon.png differ diff --git a/custom_list_view/static/description/index.html b/custom_list_view/static/description/index.html new file mode 100644 index 000000000..fa0aedf4a --- /dev/null +++ b/custom_list_view/static/description/index.html @@ -0,0 +1,543 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Custom List View

+

Helps to Show Row Number, Fixed Header, Duplicate Record and Highlight Selected Record in List View.

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+This module will ensure sticky headers, row numbers, duplicate records and record highlight for list + view and enhance the user experience.
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Sticky Header in List Views. +
+
+ + Row Numbers in List Views. +
+
+ + Able to Duplicate Records from List Views. +
+
+ + Able to Highlight Selected Records in list view. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Sticky Header in List Views +

+ +
+ +
+

Row Numbers in List Views +

+ +
+ +
+

Duplicate Records From List Views +

+ +
+
+

Highlight Records From List Views. +

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

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

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/custom_list_view/static/src/css/highlight.css b/custom_list_view/static/src/css/highlight.css new file mode 100644 index 000000000..532f8b9a2 --- /dev/null +++ b/custom_list_view/static/src/css/highlight.css @@ -0,0 +1,5 @@ + +.o_list_renderer tr.o_data_row.selected_record td{ + background-color: #7c7aad; + color:#ffffff +} \ No newline at end of file diff --git a/custom_list_view/static/src/css/sticky_header.css b/custom_list_view/static/src/css/sticky_header.css new file mode 100644 index 000000000..aef403011 --- /dev/null +++ b/custom_list_view/static/src/css/sticky_header.css @@ -0,0 +1,11 @@ +.o_list_renderer .o_list_table thead { + position: sticky; + top: 0; + z-index : 10; +} +.o_list_renderer{ + height : 100%; +} +.o_list_renderer .table thead{ +z-index: 1; +} diff --git a/custom_list_view/static/src/js/duplicate_record.js b/custom_list_view/static/src/js/duplicate_record.js new file mode 100644 index 000000000..7e51cdb15 --- /dev/null +++ b/custom_list_view/static/src/js/duplicate_record.js @@ -0,0 +1,30 @@ +/** @odoo-module */ +import { patch } from "@web/core/utils/patch"; +import { ListController } from '@web/views/list/list_controller'; + +const { Component, onWillStart, useSubEnv, useEffect, useRef } = owl; + +patch(ListController.prototype, "getActionMenuItems", { + async _onDuplicateSelectedRecords() { + for (var record in this.model.root.records) { + if (this.model.root.records[record].selected) { + await this.model.root.records[record].duplicate(); + } + } + window.location.reload(); + }, + + getActionMenuItems() { + const actionMenuItems = this._super.apply(this, arguments); + var self = this; + if (actionMenuItems) { + actionMenuItems.other.splice(1, 0, { + description: this.env._t("Duplicate"), + callback: (x) => { + this._onDuplicateSelectedRecords(); + } + }); + } + return actionMenuItems; + } +}); \ No newline at end of file diff --git a/custom_list_view/static/src/js/record_highlight.js b/custom_list_view/static/src/js/record_highlight.js new file mode 100644 index 000000000..7805425d8 --- /dev/null +++ b/custom_list_view/static/src/js/record_highlight.js @@ -0,0 +1,22 @@ +/** @odoo-module **/ +import { session } from "@web/session"; +import { ListRenderer } from "@web/views/list/list_renderer"; +import { patch } from "@web/core/utils/patch"; +import { browser } from "@web/core/browser/browser"; +import { useService } from "@web/core/utils/hooks"; + +patch(ListRenderer.prototype, 'custom_list_view/static/src/js/record_highlight.js', { + setup(){ + this._super(...arguments) + }, + toggleRecordSelection(record) { + var self = this; + this._super.apply(this, arguments); + var selectedRecord = $(event.target).closest('tr') + if($(event.target).prop('checked')){ + selectedRecord.addClass('selected_record'); + } else { + selectedRecord.removeClass('selected_record') + } + } +}) diff --git a/custom_list_view/static/src/xml/record_highlight.xml b/custom_list_view/static/src/xml/record_highlight.xml new file mode 100644 index 000000000..24c0dca5f --- /dev/null +++ b/custom_list_view/static/src/xml/record_highlight.xml @@ -0,0 +1,23 @@ + + + + Sl No + + + + + + + + + + + + + + + + + + + \ No newline at end of file