@ -0,0 +1,55 @@ |
|||
.. 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 |
|||
|
|||
Custom List View |
|||
================== |
|||
This module enhances list views by displaying row numbers.Additionally, it |
|||
facilitates the printing of list views in PDF, CSV, and Excel formats, |
|||
allows for the copying of list values to the clipboard, and introduces |
|||
a pagination feature. |
|||
|
|||
Configuration |
|||
============= |
|||
* No additional configurations needed |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
GNU LESSER GENERAL PUBLIC LICENSE, v3.0 (LGPL v3). |
|||
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------- |
|||
* Developers : (V18) Nivedhya T, |
|||
(V17) Akhil Ashok, |
|||
(V16) Rosmy John, Muhsina V |
|||
(V15) Aiswarya J P |
|||
|
|||
|
|||
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 <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import controllers |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': 'Custom List View', |
|||
'version': '18.0.1.0.0', |
|||
'category': 'Extra Tools', |
|||
'summary': 'Helps to Show Row Number, Print and Copy Listview items', |
|||
'description': "This module Helps to Show Row Number,Using this module " |
|||
"the list view items can be printed in pdf, excel and csv format," |
|||
" Also there is copy to clipboard and pagination features.", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['web', 'account'], |
|||
'data': [ |
|||
'report/custom_list_view_templates.xml', |
|||
'report/custom_list_view_reports.xml' |
|||
], |
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
('after', 'web/static/src/views/list/list_renderer.xml', |
|||
'custom_list_view/static/src/**/*'), |
|||
] |
|||
}, |
|||
'images': ['static/description/banner.jpg'], |
|||
'licence': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False |
|||
} |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import custom_list_view |
@ -0,0 +1,68 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import http |
|||
from odoo.http import request |
|||
|
|||
|
|||
class ExportData(http.Controller): |
|||
""" Controller class for exporting data from Odoo models.""" |
|||
@http.route('/get_data', auth="user", type='json') |
|||
def get_export_data(self, **kw): |
|||
"""Controller method to fetch required details and export data. |
|||
:param kw: Dictionary containing the following keys: |
|||
- fields: List of fields to export |
|||
- model: Name of the Odoo model |
|||
- res_ids: List of record IDs to export (optional) |
|||
- domain: Domain for record filtering (optional) |
|||
:return: Dictionary containing exported data and column headers""" |
|||
model = request.env[kw['model']] |
|||
field_names = [field['name'] for field in kw['fields']] |
|||
columns_headers = [val['label'].strip() for val in kw['fields']] |
|||
domain = [('id', 'in', kw['res_ids'])] \ |
|||
if kw['res_ids'] else kw['domain'] |
|||
records = model.browse(kw['res_ids']) \ |
|||
if kw['res_ids'] \ |
|||
else model.search(domain, offset=0, limit=False, order=False) |
|||
export_data = records.export_data(field_names).get('datas', []) |
|||
return {'data': export_data, 'header': columns_headers} |
|||
|
|||
@http.route('/get_data/copy', auth="user", type='json') |
|||
def get_export_data_copy(self, **kw): |
|||
"""Controller method to fetch required details, export data, and add |
|||
column headers. |
|||
:param kw: Dictionary containing the following keys: |
|||
- fields: List of fields to export |
|||
- model: Name of the Odoo model |
|||
- res_ids: List of record IDs to export (optional) |
|||
- domain: Domain for record filtering (optional) |
|||
:return: List of lists containing exported data with column headers""" |
|||
model = request.env[kw['model']] |
|||
field_names = [field['name'] for field in kw['fields']] |
|||
columns_headers = [val['label'].strip() for val in kw['fields']] |
|||
domain = [('id', 'in', kw['res_ids'])] \ |
|||
if kw['res_ids'] else kw['domain'] |
|||
records = model.browse(kw['res_ids']) \ |
|||
if kw['res_ids'] \ |
|||
else model.search(domain, offset=0, limit=False, order=False) |
|||
export_data = records.export_data(field_names).get('datas', []) |
|||
export_data.insert(0, columns_headers) |
|||
return export_data |
@ -0,0 +1,7 @@ |
|||
## Module <custom_list_view> |
|||
|
|||
#### 28.07.2025 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
- Initial Commit for Custom List View |
|||
|
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Define the action for exporting PDF --> |
|||
<record id="action_pdf_list_view" model="ir.actions.report"> |
|||
<field name="name">Export</field> |
|||
<field name="model">ir.exports</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">custom_list_view.print_pdf_listview</field> |
|||
<field name="report_file">custom_list_view.print_pdf_listview</field> |
|||
<field name="print_report_name">Pdf Report - ${object.name}</field> |
|||
<field name="binding_type">report</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,31 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Template for printing a PDF list view. --> |
|||
<template id="print_pdf_listview"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.internal_layout"> |
|||
<div class="page"> |
|||
<table class="table table-bordered" |
|||
style="table-layout: fixed"> |
|||
<!-- Render table headers --> |
|||
<t t-foreach="length" t-as="length"> |
|||
<th style="background-color: #F2F2F2; padding: 10px; color: "> |
|||
<span t-out="record['header'][length]"/> |
|||
</th> |
|||
</t> |
|||
<!-- Render table data rows --> |
|||
<t t-foreach="record['data']" t-as="rec"> |
|||
<tr> |
|||
<t t-foreach="length+1" t-as="ln"> |
|||
<td style="background-color: #F2F2F2; padding: 10px;"> |
|||
<span t-out="rec[ln]"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</t> |
|||
</table> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 776 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 85 KiB |