diff --git a/list_view_sticky_header_and_column/README.rst b/list_view_sticky_header_and_column/README.rst new file mode 100644 index 000000000..fd8816471 --- /dev/null +++ b/list_view_sticky_header_and_column/README.rst @@ -0,0 +1,49 @@ +.. 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 + +Sticky Header And Column In List View +===================================== +* This module enhances Odoo list views by introducing sticky headers and columns. + +configuration +============= +Nothing to configure. + +License +======= +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V17) Shikhil Raj + 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 https://www.cybrosys.com + +image:: https://cybrosys.com/images/logo.png + +Further information +=================== +HTML Description: ``__ diff --git a/list_view_sticky_header_and_column/__init__.py b/list_view_sticky_header_and_column/__init__.py new file mode 100644 index 000000000..cb6ac25b1 --- /dev/null +++ b/list_view_sticky_header_and_column/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# 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/list_view_sticky_header_and_column/__manifest__.py b/list_view_sticky_header_and_column/__manifest__.py new file mode 100644 index 000000000..6dcfc3b56 --- /dev/null +++ b/list_view_sticky_header_and_column/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# 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': "Sticky Header And Column In List View", + 'version': '17.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """Enhance list views with sticky headers and columns for + improved navigation and readability.""", + 'description': """This module enhances Odoo list views by introducing sticky + headers and columns. When scrolling through long lists, the header and + selected columns remain visible, providing context and easy access to + column information. Users can interact with data more effectively without + losing track of column titles.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['account', 'purchase', 'hr_expense', 'web'], + 'assets': { + 'web.assets_backend': [ + 'list_view_sticky_header_and_column/static/src/js' + '/list_view_sticky_header_and_column.js', + 'list_view_sticky_header_and_column/static/src/xml' + '/list_view_sticky_header_and_column.xml', + 'list_view_sticky_header_and_column/static/src/scss' + '/list_view_sticky_header_and_column.scss', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/list_view_sticky_header_and_column/doc/RELEASE_NOTES.md b/list_view_sticky_header_and_column/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..2c2f09a46 --- /dev/null +++ b/list_view_sticky_header_and_column/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 13.08.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Sticky Header And Column In List View diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/capture (1).png b/list_view_sticky_header_and_column/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/capture (1).png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/check.png b/list_view_sticky_header_and_column/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/check.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/chevron.png b/list_view_sticky_header_and_column/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/chevron.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/cogs.png b/list_view_sticky_header_and_column/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/cogs.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/consultation.png b/list_view_sticky_header_and_column/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/consultation.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/ecom-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/ecom-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/education-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/education-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/hotel-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/hotel-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/img.png b/list_view_sticky_header_and_column/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/img.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/license.png b/list_view_sticky_header_and_column/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/license.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/lifebuoy.png b/list_view_sticky_header_and_column/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/lifebuoy.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/manufacturing-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/manufacturing-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/photo-capture.png b/list_view_sticky_header_and_column/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/photo-capture.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/pos-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/pos-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/puzzle.png b/list_view_sticky_header_and_column/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/puzzle.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/restaurant-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/restaurant-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/service-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/service-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/trading-black.png b/list_view_sticky_header_and_column/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/trading-black.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/training.png b/list_view_sticky_header_and_column/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/training.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/update.png b/list_view_sticky_header_and_column/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/update.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/user.png b/list_view_sticky_header_and_column/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/user.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/icons/wrench.png b/list_view_sticky_header_and_column/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/icons/wrench.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/Cybrosys R.png b/list_view_sticky_header_and_column/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/misc/Cybrosys R.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/email.svg b/list_view_sticky_header_and_column/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/phone.svg b/list_view_sticky_header_and_column/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/star (1) 2.svg b/list_view_sticky_header_and_column/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/support (1) 1.svg b/list_view_sticky_header_and_column/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/support-email.svg b/list_view_sticky_header_and_column/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/tick-mark.svg b/list_view_sticky_header_and_column/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/whatsapp 1.svg b/list_view_sticky_header_and_column/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/misc/whatsapp.svg b/list_view_sticky_header_and_column/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/list_view_sticky_header_and_column/static/description/assets/modules/print_minutes_of_meeting.png b/list_view_sticky_header_and_column/static/description/assets/modules/print_minutes_of_meeting.png new file mode 100644 index 000000000..1d9e21fbc Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/modules/print_minutes_of_meeting.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/modules/project_custom_gantt.png b/list_view_sticky_header_and_column/static/description/assets/modules/project_custom_gantt.png new file mode 100644 index 000000000..2ad200f9f Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/modules/project_custom_gantt.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/modules/project_report_pdf.png b/list_view_sticky_header_and_column/static/description/assets/modules/project_report_pdf.png new file mode 100644 index 000000000..84457ac0a Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/modules/project_report_pdf.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/modules/project_task_attachments.jpg b/list_view_sticky_header_and_column/static/description/assets/modules/project_task_attachments.jpg new file mode 100644 index 000000000..492b47dbe Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/modules/project_task_attachments.jpg differ diff --git a/list_view_sticky_header_and_column/static/description/assets/modules/project_tasks_from_templates.png b/list_view_sticky_header_and_column/static/description/assets/modules/project_tasks_from_templates.png new file mode 100644 index 000000000..c84c8b1c4 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/modules/project_tasks_from_templates.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/modules/projects_task_checklists.png b/list_view_sticky_header_and_column/static/description/assets/modules/projects_task_checklists.png new file mode 100644 index 000000000..3ce71a366 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/modules/projects_task_checklists.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/screenshots/1.png b/list_view_sticky_header_and_column/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..e939dab19 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/screenshots/1.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/screenshots/2.png b/list_view_sticky_header_and_column/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..f65a2c148 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/screenshots/2.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/screenshots/3.png b/list_view_sticky_header_and_column/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..192db9d9e Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/screenshots/3.png differ diff --git a/list_view_sticky_header_and_column/static/description/assets/screenshots/hero.gif b/list_view_sticky_header_and_column/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..575d9aae2 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/assets/screenshots/hero.gif differ diff --git a/list_view_sticky_header_and_column/static/description/banner.jpg b/list_view_sticky_header_and_column/static/description/banner.jpg new file mode 100644 index 000000000..ae2913e34 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/banner.jpg differ diff --git a/list_view_sticky_header_and_column/static/description/icon.png b/list_view_sticky_header_and_column/static/description/icon.png new file mode 100644 index 000000000..5096a50e5 Binary files /dev/null and b/list_view_sticky_header_and_column/static/description/icon.png differ diff --git a/list_view_sticky_header_and_column/static/description/index.html b/list_view_sticky_header_and_column/static/description/index.html new file mode 100644 index 000000000..63b1638a2 --- /dev/null +++ b/list_view_sticky_header_and_column/static/description/index.html @@ -0,0 +1,569 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Sticky Header And Column In List View

+

+ Enhance List Views With Sticky Headers And Columns For + Improved Navigation And Readability. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Community & Enterprise Support. +

+
+
+
+
+
+
+ +
+
+

Enhanced Data Visibility. +

+
+
+
+
+
+
+ +
+
+

+ Support for Different Modules. +

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

+ Click the pin icon in the list view headers to select the sticky column.
+ Clicking on a column outside the pinned area will unselect the sticky header. +

+
+
+
+
+
+
+ +
+
+

+ As you scroll horizontally, you will notice that the pinned records and header row remain in place, + maintaining visibility. +

+
+
+
+
+
+
+ +
+
+

+ Upon vertical scrolling through a list of records, the header row of the table remains sticky. +

+
+
+
+
+
+
+
    +
  • + Community & Enterprise Support. +
  • +
  • + The module introduces sticky headers and columns to Odoo's list view. +
  • +
  • + Enhanced Data Visibility. +
  • +
  • + Support for Different Modules. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:13 August 2024 +
+

+ Initial commit for Sticky Header And Column In List View +

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/list_view_sticky_header_and_column/static/src/js/list_view_sticky_header_and_column.js b/list_view_sticky_header_and_column/static/src/js/list_view_sticky_header_and_column.js new file mode 100644 index 000000000..3ab2197b4 --- /dev/null +++ b/list_view_sticky_header_and_column/static/src/js/list_view_sticky_header_and_column.js @@ -0,0 +1,62 @@ +/** @odoo-module **/ +/** This file will used to stick the selected header and column in the list view **/ +import { patch } from "@web/core/utils/patch"; +import { ListRenderer } from "@web/views/list/list_renderer"; +patch(ListRenderer.prototype, { + /** super the setup function **/ + setup() { + super.setup(); + + }, + /** + * function defining the button having t-on-click _onClick + */ + _onClickIcon(ev, record) { + ev.preventDefault(); + ev.stopPropagation() + const $clickedHeader = $(ev.currentTarget).closest('th'); + const columnIndex = $clickedHeader.index(); + console.log(this.__owl__.bdom.parentEl) + $(this.__owl__.bdom.parentEl.querySelectorAll('.sticky-column')).removeClass('sticky-column'); + console.log($(this.__owl__.bdom.parentEl.querySelectorAll('.sticky-column')).removeClass('sticky-column')) + $(this.__owl__.bdom.parentEl.querySelectorAll('.clicked-header')).removeClass('clicked-header'); + $clickedHeader.addClass('clicked-header'); + const $tableHeaders = $(this.__owl__.bdom.parentEl.querySelectorAll('.o_list_table th')); + const $tableRows = $(this.__owl__.bdom.parentEl.querySelectorAll('.o_list_table tr')); + const $tfootRow = $(this.__owl__.bdom.parentEl.querySelectorAll('.o_list_table tfoot tr')[0].children); + const $selectedFooterCells = $tfootRow.filter(`td:nth-child(-n+${columnIndex + 1})`); + $selectedFooterCells.addClass('sticky-column'); + const $selectedColumns = $(this.__owl__.bdom.parentEl.querySelectorAll(`.o_data_row td:nth-child(-n+${columnIndex + 1})`)); + const $selectedHeaderCells = $tableHeaders.filter(`th:nth-child(-n+${columnIndex + 1})`); + $tableHeaders.removeClass('sticky-column').css('left', ''); + $(this.__owl__.bdom.parentEl.querySelectorAll('.o_data_row td')).removeClass('sticky-column').css('left', ''); + $selectedColumns.addClass('sticky-column'); + $selectedHeaderCells.addClass('sticky-column'); + $tableHeaders.filter('.sticky-column').css('top', '0'); + const $targetColumn = $selectedColumns.eq(columnIndex); + const targetLeftPosition = $targetColumn.position().left; + const columnsToAdjust = columnIndex + 1; + $tableRows.each(function (index, row) { + const $headerCells = $(row).find('th'); + const $rowCells = $(row).find('td'); + for (let i = 0; i < columnsToAdjust; i++) { + if ($headerCells.eq(i).length > 0) { + $headerCells.eq(i).css('left', `${$headerCells.eq(i).position().left}px`); + } + if ($rowCells.eq(i).length > 0) { + $rowCells.eq(i).css('left', `${$rowCells.eq(i).position().left}px`); + } + } + }); + }, + /** + * super onClickSortColumn function and remove the icon and element having the class sticky-column + */ + onClickSortColumn(column) { + super.onClickSortColumn(...arguments); + $(this.__owl__.bdom.parentEl.querySelectorAll('.sticky-column')).removeClass('sticky-column'); + $(this.__owl__.bdom.parentEl.querySelectorAll('.clicked-header')).removeClass('clicked-header'); + const $tableHeaders = $(this.__owl__.bdom.parentEl.querySelectorAll('.o_list_table th')); + $tableHeaders.removeClass('sticky-column').css('left', ''); + } +}); diff --git a/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss new file mode 100644 index 000000000..d5f7b8740 --- /dev/null +++ b/list_view_sticky_header_and_column/static/src/scss/list_view_sticky_header_and_column.scss @@ -0,0 +1,51 @@ +.sticky-column { + position: sticky !important; + background-color: white; + z-index: 2; +} +.o_list_view .o_list_table td.sticky-column { + z-index: 4; + background-color: white; +} +.o_list_view .o_list_table thead { + position: sticky; + top: 0; + z-index: 3; + background-color: white; +} +.o_list_view .o_list_table th.sticky-column { + z-index: 4; + background-color: white; +} +.o_account_reports_page .table-responsive { + overflow-x: auto; + overflow-y: visible; +} +.table-responsive { + overflow: visible; +} +.o_list_view .table-responsive .table thead { + z-index: 5; +} +.o_list_renderer .o_list_table thead { + position: sticky; + top: 0; + z-index: 6; +} +th.sticky-column::before { + content: ""; + position: absolute; + width: 5px; + height: 100%; + background: white; + top: 0; + left: -4px; +} +.fa-thumb-tack { + display: none; +} + +th:hover .fa-thumb-tack, +th.clicked-header .fa-thumb-tack { + display: block; +} diff --git a/list_view_sticky_header_and_column/static/src/xml/list_view_sticky_header_and_column.xml b/list_view_sticky_header_and_column/static/src/xml/list_view_sticky_header_and_column.xml new file mode 100644 index 000000000..82d9ff4d7 --- /dev/null +++ b/list_view_sticky_header_and_column/static/src/xml/list_view_sticky_header_and_column.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/room/__manifest__.py b/room/__manifest__.py index 5a0d2625d..d538c5d17 100644 --- a/room/__manifest__.py +++ b/room/__manifest__.py @@ -11,6 +11,8 @@ 'data': [ 'data/message_template_views.xml', 'data/room_wechat_cron_data.xml', + 'security/ir_rule.xml', + 'security/ir.model.access.csv', 'views/room_booking_views.xml', 'views/room_room_views.xml', 'views/room_menus.xml', @@ -18,8 +20,7 @@ 'views/room_office_views.xml', 'views/webclient_templates.xml', 'data/ir_module_category_data.xml', - 'security/ir_rule.xml', - 'security/ir.model.access.csv', + 'report/meet_check_report.xml', 'wizard/room_booking_sign_wizard.xml', ], 'demo': [ @@ -38,7 +39,7 @@ "room/static/src/room_booking/primary_variables.scss", "room/static/src/room_booking/bootstrap_overridden.scss", - #2 Load variables, Bootstrap and UI icons bundles + # 2 Load variables, Bootstrap and UI icons bundles ('include', 'web._assets_helpers'), ('include', 'web._assets_backend_helpers'), 'web/static/src/scss/pre_variables.scss', diff --git a/room/models/room_booking.py b/room/models/room_booking.py index 03f04d078..0ec4000e0 100644 --- a/room/models/room_booking.py +++ b/room/models/room_booking.py @@ -6,8 +6,8 @@ from io import BytesIO from odoo import api, fields, models, _ from odoo.exceptions import ValidationError, UserError import os -from odoo.tools import html_escape, html_sanitize -from bs4 import BeautifulSoup +from datetime import timedelta + class RoomBooking(models.Model): _name = "room.booking" @@ -96,14 +96,28 @@ class RoomBooking(models.Model): def meet_notice(self): if self.is_notice: - for user in self.room_users_ids: + for internal in self.room_users_ids: self.env['room.meeting.sign'].create({ 'room_booking_id': self.id, - 'sign_user_id': user.id, - 'sign_user_name': user.name, + 'sign_user_name': internal.name, + 'partner_name': internal.employee_id.department_id.name, + 'job': internal.employee_id.job_id.name, + 'mobile': internal.employee_id.mobile_phone, 'user_type': 'insiders', 'sign_type': 'no', }) + # 缺少逻辑 + for external in self.other_user_ids: + self.env['room.meeting.sign'].create({ + 'room_booking_id': self.id, + 'partner_name': external.name, + # 'sign_user_name': external.name, # 单位名称里面的联系人 + # 'job': external.function, + # 'mobile': external.mobile, + 'user_type': 'outsiders', + 'sign_type': 'no', + }) + event = self.env['calendar.event'].create({ 'name': self.name, 'start': self.start_datetime, @@ -115,8 +129,10 @@ class RoomBooking(models.Model): 'partner_id': partner.address_id.id, }) # 企业用户发送通知 - partner_ids = self.sudo().env['res.users'].search([('id', 'in', self.room_users_ids.ids)]).mapped('partner_id').ids - self.sudo().with_context(lang=self.env.lang)._message_auto_subscribe_notify(partner_ids, 'room.message_yuthon_room_users_data') + partner_ids = self.sudo().env['res.users'].search([('id', 'in', self.room_users_ids.ids)]).mapped( + 'partner_id').ids + self.sudo().with_context(lang=self.env.lang)._message_auto_subscribe_notify(partner_ids, + 'room.message_yuthon_room_users_data') # odoo发通知 def meeting_sign_in(self): @@ -148,9 +164,11 @@ class RoomBooking(models.Model): attendees = sync_data.get("attendees", []) for attendee in attendees: if attendee.get("userid", ""): - user_obj = self.sudo().env["res_users"].search([("oauth_uid", '=', attendee.get("userid", ""))]) + user_obj = self.sudo().env["res_users"].search( + [("oauth_uid", '=', attendee.get("userid", ""))]) for obj in user_obj: - sign_obj = self.sudo().env["room.meeting.sign"].search([("sign_user_id", '=', obj.id), ("room_booking_id", "=", record.id)]) + sign_obj = self.sudo().env["room.meeting.sign"].search( + [("sign_user_id", '=', obj.id), ("room_booking_id", "=", record.id)]) sign_obj.write({"sign_type": 'yes'}) @api.constrains("start_datetime", "stop_datetime") diff --git a/room/models/room_meeting_sign.py b/room/models/room_meeting_sign.py index a72c8a054..5e09d704a 100644 --- a/room/models/room_meeting_sign.py +++ b/room/models/room_meeting_sign.py @@ -10,7 +10,10 @@ class RoomMeetingSign(models.Model): _description = "会议签到" room_booking_id = fields.Many2one('room.booking', string="会议") - sign_user_id = fields.Many2one('res.users', string="人员") sign_user_name = fields.Char(string="人员") + partner_name = fields.Char(string="单位") + job = fields.Char(string="职务") + mobile = fields.Char(string="手机号码") user_type = fields.Selection([('insiders', '内部人员'), ('outsiders', '外部人员')], default='no', string="人员类型") sign_type = fields.Selection([('no', '未签到'), ('yes', '已签到')], default='no', string="签到状态") + diff --git a/room/report/meet_check_report.xml b/room/report/meet_check_report.xml new file mode 100644 index 000000000..3c2fff6fe --- /dev/null +++ b/room/report/meet_check_report.xml @@ -0,0 +1,96 @@ + + + + + + 会议签到表打印 + room.booking + qweb-pdf + room.room_booking_report_template + room.room_booking_report_template + '%s-签到表' % (object.name).replace('/', '') + + report + + + + \ No newline at end of file diff --git a/room/views/room_booking_views.xml b/room/views/room_booking_views.xml index 4f142e793..8326463b3 100644 --- a/room/views/room_booking_views.xml +++ b/room/views/room_booking_views.xml @@ -156,10 +156,12 @@ - + - + + + diff --git a/soong_workflow/__manifest__.py b/soong_workflow/__manifest__.py index e27761f6d..646266375 100644 --- a/soong_workflow/__manifest__.py +++ b/soong_workflow/__manifest__.py @@ -20,6 +20,7 @@ "views/soong_workflow_link_views.xml", "views/soong_workflow_views.xml", "views/soong_workflow_record.xml", + "views/soong_approval_group.xml", 'wizard/approval_notice_wizard_views.xml', "wizard/soong_workflow_comment_wizard_view.xml", "templates/soong_workflow_templates.xml", diff --git a/soong_workflow/data/other_data b/soong_workflow/data/other_data new file mode 100644 index 000000000..5ea092352 --- /dev/null +++ b/soong_workflow/data/other_data @@ -0,0 +1,2 @@ +1. 预置审批分组 +2. 我的请求要开发 \ No newline at end of file diff --git a/soong_workflow/models/__init__.py b/soong_workflow/models/__init__.py index 5e598c909..e401b6a38 100644 --- a/soong_workflow/models/__init__.py +++ b/soong_workflow/models/__init__.py @@ -11,3 +11,4 @@ from . import soong_hr_employee from . import soong_user_role from . import soong_note from . import soong_workflow_log +from . import soong_approval_group diff --git a/soong_workflow/models/soong_approval_group.py b/soong_workflow/models/soong_approval_group.py new file mode 100644 index 000000000..0f8e78d82 --- /dev/null +++ b/soong_workflow/models/soong_approval_group.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +from odoo import api, fields, models, _ + + +class SoongApprovalGroup(models.Model): + _name = 'soong.approval.group' + _order = 'sequence' + + name = fields.Char(string="分组名称") + sequence = fields.Integer(default=1) diff --git a/soong_workflow/models/soong_note.py b/soong_workflow/models/soong_note.py index 6c054c776..28388fc25 100644 --- a/soong_workflow/models/soong_note.py +++ b/soong_workflow/models/soong_note.py @@ -6,15 +6,5 @@ class SoongNote(models.Model): _name = 'soong.note' name = fields.Char(string="审批意见") - - -class SoongRetuenNote(models.Model): - _name = 'soong.return.note' - - name = fields.Char(string="退回意见") - - -class SoongReturntType(models.Model): - _name = 'soong.return.type' - - name = fields.Char(string="退回类型") + type = fields.Selection([('agree', '同意'), ('return', '退回')], string="意见类型") + return_type = fields.Char(string="退回类型") diff --git a/soong_workflow/models/soong_workflow.py b/soong_workflow/models/soong_workflow.py index ec70b574c..6b1ba2a51 100644 --- a/soong_workflow/models/soong_workflow.py +++ b/soong_workflow/models/soong_workflow.py @@ -63,6 +63,7 @@ class SoongWorkflow(models.Model): start_time = fields.Datetime(string="生效日期", copy=False) end_time = fields.Datetime(string="结束日期", copy=False) is_enable = fields.Boolean(string="是否启用", default="False", compute="compute_is_enable", store=True) + approvals_group_id = fields.Many2one('soong.approval.group', string="审批分组") def copy(self, default=None): workflow_id = self.search([('model_id', '=', self.model_id.id)]) diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 78a53b388..4bbe2a4a6 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -227,20 +227,20 @@ class SoongWorkflowMixin(models.AbstractModel): @api.model def get_view(self, view_id=None, view_type="form", **options): res = super().get_view(view_id, view_type, **options) - - if view_type in ["tree", "form"]: - params = {} - if "field" in res["arch"]: - res = self._remove_default_header(view_type, res) - # res = self._remove_default_modifiers(view_type, res) - res = self._load_buttons_view(view_type, res) - res = self._load_button_box_view(view_type, res) - res = self._load_state_view(view_type, res) - # res = self._load_one2many_views(view_type, res) - res = self._update_fields_view(view_type, res) - res = self._add_state_tree_view(view_type, res) - res = self._add_soong_workflow_log(view_type, res, params) - return res + if 'create="false"' not in res['arch']: + if view_type in ["tree", "form"]: + params = {} + if "field" in res["arch"]: + res = self._remove_default_header(view_type, res) + # res = self._remove_default_modifiers(view_type, res) + res = self._load_buttons_view(view_type, res) + res = self._load_button_box_view(view_type, res) + res = self._load_state_view(view_type, res) + # res = self._load_one2many_views(view_type, res) + res = self._update_fields_view(view_type, res) + res = self._add_state_tree_view(view_type, res) + res = self._add_soong_workflow_log(view_type, res, params) + return res def _remove_default_header(self, view_type, res): """ diff --git a/soong_workflow/security/ir.model.access.csv b/soong_workflow/security/ir.model.access.csv index 099d5ebc2..ceb16fda0 100644 --- a/soong_workflow/security/ir.model.access.csv +++ b/soong_workflow/security/ir.model.access.csv @@ -18,8 +18,7 @@ access_soong_workflow_record_user,soong_workflow_record_user,model_soong_workflo access_soong_user_role,soong_user_role,model_soong_user_role,soong_workflow.group_soong_workflow_user,1,1,1,1 access_soong_approval_users,soong_approval_users,model_soong_approval_users,soong_workflow.group_soong_workflow_user,1,1,1,1 access_soong_note,soong_note,model_soong_note,soong_workflow.group_soong_workflow_user,1,1,1,1 -access_soong_return_note,soong_return_note,model_soong_return_note,soong_workflow.group_soong_workflow_user,1,1,1,1 -access_soong_return_type,soong_return_type,model_soong_return_type,soong_workflow.group_soong_workflow_user,1,1,1,1 +access_soong_approval_group,soong_approval_group,model_soong_approval_group,soong_workflow.group_soong_workflow_user,1,1,1,1 access_soong_approval_notice_wizard,soong_approval_notice_wizard,model_soong_approval_notice_wizard,base.group_user,1,1,1,1 diff --git a/soong_workflow/static/src/css/approval.scss b/soong_workflow/static/src/css/approval.scss new file mode 100644 index 000000000..edaf0e203 --- /dev/null +++ b/soong_workflow/static/src/css/approval.scss @@ -0,0 +1,54 @@ +.o_kanban_row { + @media (min-width: 768px) { + display: block; + + // 显示的样式 + .o_kanban_group { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-flex-flow: row wrap; + flex-flow: row wrap; + min-width: 100%; + + .o_kanban_header { + min-width: 100%; + width: 100%; + + .o_kanban_header_title { + .o_column_title { + font-weight: bold; + } + } + } + + .o_kanban_record { + display: table-cell; + min-width: 332px; + width: 332px; + margin: 4px 8px; + } + + .o_kanban_load_more { + display: table-cell; + min-width: 332px; + width: 332px; + margin: 4px 8px; + } + } + + // 收拢时的样式 + .o_column_folded { + .o_kanban_header { + .o_kanban_header_title { + .o_column_title { + transform: none; + top: 10px; + left: 20px; + } + } + } + + } + } +} \ No newline at end of file diff --git a/soong_workflow/views/kklw_workflow_approval_views.xml b/soong_workflow/views/kklw_workflow_approval_views.xml index 2258823d6..d65d3cfc3 100644 --- a/soong_workflow/views/kklw_workflow_approval_views.xml +++ b/soong_workflow/views/kklw_workflow_approval_views.xml @@ -4,7 +4,7 @@ 审批 soong.workflow - + @@ -19,7 +19,7 @@

- +
diff --git a/soong_workflow/views/menuitem.xml b/soong_workflow/views/menuitem.xml index d2b03929b..cf9913708 100644 --- a/soong_workflow/views/menuitem.xml +++ b/soong_workflow/views/menuitem.xml @@ -13,8 +13,19 @@ sequence="200"/> + + + + diff --git a/soong_workflow/views/soong_approval_group.xml b/soong_workflow/views/soong_approval_group.xml new file mode 100644 index 000000000..bc2326d2e --- /dev/null +++ b/soong_workflow/views/soong_approval_group.xml @@ -0,0 +1,40 @@ + + + + soong.approval.group.view.tree + soong.approval.group + + + + + + + + + + soong.approval.group.view.form + soong.approval.group + +
+ + + + + +
+
+
+ + + 审批分组 + soong.approval.group + tree,form + + + +
\ No newline at end of file diff --git a/soong_workflow/views/soong_note_views.xml b/soong_workflow/views/soong_note_views.xml index 9d8d3db3c..f2c1de165 100644 --- a/soong_workflow/views/soong_note_views.xml +++ b/soong_workflow/views/soong_note_views.xml @@ -1,76 +1,46 @@ - - - soong.note.tree - soong.note - - - - - - + + soong.note.tree + soong.note + + + + + + + + - - 常用审批意见 - soong.note - tree - + + soong.note.search + soong.note + + + + + + + + - - soong.return.type.tree - soong.return.type - - - - - - + + 常用审批意见 + soong.note + tree + + {'search_default_type': True,} + - - 退回类型配置 - soong.return.type - tree - - - - soong.return.note.tree - soong.return.note - - - - - - - - - 退回意见配置 - soong.return.note - tree - - - - - - - - - diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml index f768a85d8..d9c6d9524 100644 --- a/soong_workflow/views/soong_workflow_record.xml +++ b/soong_workflow/views/soong_workflow_record.xml @@ -42,7 +42,7 @@ name="WorkFollow Record" parent="menu_soong_workflow_root" action="soong_workflow_record_action" - sequence="1"/> + sequence="3"/> diff --git a/soong_workflow/views/soong_workflow_views.xml b/soong_workflow/views/soong_workflow_views.xml index 61a80ab91..b002cf0ca 100644 --- a/soong_workflow/views/soong_workflow_views.xml +++ b/soong_workflow/views/soong_workflow_views.xml @@ -98,9 +98,9 @@ diff --git a/yuthon_hr_employee/__manifest__.py b/yuthon_hr_employee/__manifest__.py index db71e7d32..45d2e9028 100644 --- a/yuthon_hr_employee/__manifest__.py +++ b/yuthon_hr_employee/__manifest__.py @@ -21,6 +21,8 @@ 'views/yuthon_hr_department_views.xml', 'views/yuthon_job_lv_views.xml', 'views/inherit_res_user_views.xml', + 'views/hr_job_type_views.xml', + 'views/inherit_hr_job_views.xml', 'wizard/hr_employee_wizard_views.xml', ], 'installable': True, diff --git a/yuthon_hr_employee/models/__init__.py b/yuthon_hr_employee/models/__init__.py index 6538754fb..e8c829d07 100644 --- a/yuthon_hr_employee/models/__init__.py +++ b/yuthon_hr_employee/models/__init__.py @@ -3,4 +3,5 @@ from . import hr_employee_page from . import yuthon_job_lv from . import yuthon_hr_department from . import inherit_res_user +from . import inherit_hr_job diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py new file mode 100644 index 000000000..2ba66a9bd --- /dev/null +++ b/yuthon_hr_employee/models/inherit_hr_job.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from odoo import api, fields, models, _ + + +class HrJob(models.Model): + _inherit = "hr.job" + + company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), + ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司") + job_type_id = fields.Many2one('hr.job.type', string="岗位类别") + job_lv_id = fields.Many2one('yuthon.job.lv', string="职级") + start_time = fields.Date(string="生效时间") + end_time = fields.Date(string="失效时间") + + +class HrJobType(models.Model): + _name = "hr.job.type" + + name = fields.Char(string="类别名称") \ No newline at end of file diff --git a/yuthon_hr_employee/security/ir.model.access.csv b/yuthon_hr_employee/security/ir.model.access.csv index 54698cea9..c859e7831 100644 --- a/yuthon_hr_employee/security/ir.model.access.csv +++ b/yuthon_hr_employee/security/ir.model.access.csv @@ -1,5 +1,6 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_yuthon_job_lv,yuthon_job_lv,model_yuthon_job_lv,base.group_user,1,1,1,1 +access_hr_job_type,hr_job_type,model_hr_job_type,base.group_user,1,1,1,1 access_yuthon_hr_employee_wizard,yuthon_hr_employee_wizard,model_yuthon_hr_employee_wizard,base.group_user,1,1,1,1 access_yuthon_emergency_contact_line,yuthon_emergency_contact_line,model_yuthon_emergency_contact_line,base.group_user,1,1,1,1 access_yuthon_work_experience_line,yuthon_work_experience_line,model_yuthon_work_experience_line,base.group_user,1,1,1,1 diff --git a/yuthon_hr_employee/views/hr_job_type_views.xml b/yuthon_hr_employee/views/hr_job_type_views.xml new file mode 100644 index 000000000..781ea30c5 --- /dev/null +++ b/yuthon_hr_employee/views/hr_job_type_views.xml @@ -0,0 +1,26 @@ + + + + hr.job.type.tree + hr.job.type + + + + + + + + + + 岗位类型 + hr.job.type + tree + + + + \ No newline at end of file diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml new file mode 100644 index 000000000..6b75cae68 --- /dev/null +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -0,0 +1,17 @@ + + + + hr.job.inherit + hr.job + + + + + + + + + + + + \ No newline at end of file diff --git a/yuthon_performance/views/yuthon_performance_menus.xml b/yuthon_performance/views/yuthon_performance_menus.xml index 09566a447..3ae519d36 100644 --- a/yuthon_performance/views/yuthon_performance_menus.xml +++ b/yuthon_performance/views/yuthon_performance_menus.xml @@ -47,17 +47,17 @@ action="yuthon_index_management_action"/> - - + + + + + + + + + + +