diff --git a/export_view_pdf/README.rst b/export_view_pdf/README.rst new file mode 100644 index 000000000..5db2df142 --- /dev/null +++ b/export_view_pdf/README.rst @@ -0,0 +1,45 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Export View PDF +=============== +This module helps to Export current List view in PDF format. + +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) shamsad, + (V17) SAFA FAHEEM PE, + (V18) Ayana 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/export_view_pdf/__init__.py b/export_view_pdf/__init__.py new file mode 100644 index 000000000..156acf2fb --- /dev/null +++ b/export_view_pdf/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 . +# +############################################################################# +from . import controllers diff --git a/export_view_pdf/__manifest__.py b/export_view_pdf/__manifest__.py new file mode 100644 index 000000000..4cc6a6d8e --- /dev/null +++ b/export_view_pdf/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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': "Export View PDF", + 'version': '18.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """Export Current List View in PDF Format""", + 'description': """This module will add option to export the details of the + current list vie in the PDF format.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base','web'], + 'data': + [ + 'data/export_paper_format.xml', + 'report/export_pdf_group_by_template.xml', + 'report/export_pdf_template.xml', + 'report/ir_exports_report.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'export_view_pdf/static/src/js/export_dialog.js', + 'export_view_pdf/static/src/js/pdf_export.js', + 'export_view_pdf/static/src/xml/export_dialog.xml', + 'export_view_pdf/static/src/xml/export_pdf_dropdown.xml' + ] + }, + 'images': [ + 'static/description/banner.jpg' + ], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/export_view_pdf/controllers/__init__.py b/export_view_pdf/controllers/__init__.py new file mode 100644 index 000000000..08462f27a --- /dev/null +++ b/export_view_pdf/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 . +# +############################################################################# +from . import export_view_pdf diff --git a/export_view_pdf/controllers/export_view_pdf.py b/export_view_pdf/controllers/export_view_pdf.py new file mode 100644 index 000000000..1f728855c --- /dev/null +++ b/export_view_pdf/controllers/export_view_pdf.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 . +# +############################################################################# +from odoo import http +from odoo.http import request + + +class ExportData(http.Controller): + """This controller will fetch the data of the fields selected in the + dialog to the pdf report.""" + @http.route('/get_data', auth="user", type='json') + def action_get_export_data(self, **kw): + """ + method to fetch required details + """ + fields = kw['fields'] + model = kw['model'] + Model = request.env[model] + field_names = [f['name'] for f in fields] + columns_headers = [val['label'].strip() for val in fields] + domain = [('id', 'in', kw['res_ids'])] \ + if kw['res_ids'] else kw['domain'] + groupby = kw['grouped_by'] + records = Model.browse(kw['res_ids']) \ + if kw['res_ids'] \ + else Model.search(domain, offset=0, limit=False, order=False) + if groupby: + field_names = [f['name'] for f in fields] + groupby_type = [Model._fields[x.split(':')[0]].type for x in + kw['grouped_by']] + domain = kw['domain'] + groups_data = Model.read_group(domain, + [x if x != '.id' else 'id' for x in + field_names], groupby, lazy=False) + group_by = [] + for rec in groups_data: + ids = Model.search(rec['__domain']) + list_key = [x for x in rec.keys() if + x in field_names and x not in kw['grouped_by']] + export_data = [ids.export_data(field_names).get('datas', [])] + group_tuple = ( + {'count': rec['__count']}, rec.get(kw['grouped_by'][0]), + export_data, + [(rec[x], field_names.index(x)) for x in list_key]) + group_by.append(group_tuple) + return {'header': columns_headers, 'data': export_data, + 'type': groupby_type, 'other': group_by} + else: + export_data = records.export_data(field_names).get('datas', []) + return {'data': export_data, 'header': columns_headers} diff --git a/export_view_pdf/data/export_paper_format.xml b/export_view_pdf/data/export_paper_format.xml new file mode 100644 index 000000000..fd15afc2c --- /dev/null +++ b/export_view_pdf/data/export_paper_format.xml @@ -0,0 +1,20 @@ + + + + + + Export PDF + + custom + Landscape + 40.00 + 32.00 + 7.00 + 7.00 + + 35 + + 90 + + + diff --git a/export_view_pdf/doc/RELEASE_NOTES.md b/export_view_pdf/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..827e9925e --- /dev/null +++ b/export_view_pdf/doc/RELEASE_NOTES.md @@ -0,0 +1,8 @@ +## Module + +#### 29.11.2024 +#### Version 18.0.1.0.0 +#### ADD +- Initial commit for Export View PDF + + diff --git a/export_view_pdf/report/export_pdf_group_by_template.xml b/export_view_pdf/report/export_pdf_group_by_template.xml new file mode 100644 index 000000000..e626c544d --- /dev/null +++ b/export_view_pdf/report/export_pdf_group_by_template.xml @@ -0,0 +1,57 @@ + + + + + diff --git a/export_view_pdf/report/export_pdf_template.xml b/export_view_pdf/report/export_pdf_template.xml new file mode 100644 index 000000000..2583db253 --- /dev/null +++ b/export_view_pdf/report/export_pdf_template.xml @@ -0,0 +1,29 @@ + + + + + diff --git a/export_view_pdf/report/ir_exports_report.xml b/export_view_pdf/report/ir_exports_report.xml new file mode 100644 index 000000000..ff24e99b9 --- /dev/null +++ b/export_view_pdf/report/ir_exports_report.xml @@ -0,0 +1,20 @@ + + + + + Export + ir.exports + qweb-pdf + export_view_pdf.export_in_pdf + report + + + + + + Export + ir.exports + qweb-pdf + export_view_pdf.export_in_pdf_group_by + + diff --git a/export_view_pdf/static/description/assets/cybro-icon.png b/export_view_pdf/static/description/assets/cybro-icon.png new file mode 100755 index 000000000..06e73e11d Binary files /dev/null and b/export_view_pdf/static/description/assets/cybro-icon.png differ diff --git a/export_view_pdf/static/description/assets/cybro-odoo.png b/export_view_pdf/static/description/assets/cybro-odoo.png new file mode 100755 index 000000000..ed02e07a4 Binary files /dev/null and b/export_view_pdf/static/description/assets/cybro-odoo.png differ diff --git a/export_view_pdf/static/description/assets/h2.png b/export_view_pdf/static/description/assets/h2.png new file mode 100755 index 000000000..0bfc4707d Binary files /dev/null and b/export_view_pdf/static/description/assets/h2.png differ diff --git a/export_view_pdf/static/description/assets/icons/arrows-repeat.svg b/export_view_pdf/static/description/assets/icons/arrows-repeat.svg new file mode 100755 index 000000000..1d7efabc5 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/banner-1.png b/export_view_pdf/static/description/assets/icons/banner-1.png new file mode 100755 index 000000000..c180db172 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/banner-1.png differ diff --git a/export_view_pdf/static/description/assets/icons/banner-2.svg b/export_view_pdf/static/description/assets/icons/banner-2.svg new file mode 100755 index 000000000..e606d97d9 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/banner-bg.png b/export_view_pdf/static/description/assets/icons/banner-bg.png new file mode 100755 index 000000000..a8238d3c0 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/banner-bg.png differ diff --git a/export_view_pdf/static/description/assets/icons/banner-bg.svg b/export_view_pdf/static/description/assets/icons/banner-bg.svg new file mode 100755 index 000000000..b1378103e --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/banner-call.svg b/export_view_pdf/static/description/assets/icons/banner-call.svg new file mode 100755 index 000000000..96c687e81 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/export_view_pdf/static/description/assets/icons/banner-mail.svg b/export_view_pdf/static/description/assets/icons/banner-mail.svg new file mode 100755 index 000000000..cbf0d158d --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/export_view_pdf/static/description/assets/icons/banner-pattern.svg b/export_view_pdf/static/description/assets/icons/banner-pattern.svg new file mode 100755 index 000000000..9c1c7e101 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/banner-promo.svg b/export_view_pdf/static/description/assets/icons/banner-promo.svg new file mode 100755 index 000000000..d52791b11 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/brand-pair.svg b/export_view_pdf/static/description/assets/icons/brand-pair.svg new file mode 100755 index 000000000..d8db7fc1e --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/check.png b/export_view_pdf/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/check.png differ diff --git a/export_view_pdf/static/description/assets/icons/chevron.png b/export_view_pdf/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/chevron.png differ diff --git a/export_view_pdf/static/description/assets/icons/close-icon.svg b/export_view_pdf/static/description/assets/icons/close-icon.svg new file mode 100755 index 000000000..df8cce37a --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/export_view_pdf/static/description/assets/icons/cogs.png b/export_view_pdf/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/cogs.png differ diff --git a/export_view_pdf/static/description/assets/icons/collabarate-icon.svg b/export_view_pdf/static/description/assets/icons/collabarate-icon.svg new file mode 100755 index 000000000..dd4e10518 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/export_view_pdf/static/description/assets/icons/consultation.png b/export_view_pdf/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/consultation.png differ diff --git a/export_view_pdf/static/description/assets/icons/cybro-logo.png b/export_view_pdf/static/description/assets/icons/cybro-logo.png new file mode 100755 index 000000000..ff4b78220 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/cybro-logo.png differ diff --git a/export_view_pdf/static/description/assets/icons/down.svg b/export_view_pdf/static/description/assets/icons/down.svg new file mode 100755 index 000000000..f21c36271 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/export_view_pdf/static/description/assets/icons/ecom-black.png b/export_view_pdf/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/ecom-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/education-black.png b/export_view_pdf/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/education-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/faq.png b/export_view_pdf/static/description/assets/icons/faq.png new file mode 100755 index 000000000..4250b5b81 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/faq.png differ diff --git a/export_view_pdf/static/description/assets/icons/feature-icon.svg b/export_view_pdf/static/description/assets/icons/feature-icon.svg new file mode 100755 index 000000000..fa0ea6850 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/feature.png b/export_view_pdf/static/description/assets/icons/feature.png new file mode 100755 index 000000000..ac7a785c0 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/feature.png differ diff --git a/export_view_pdf/static/description/assets/icons/gear.svg b/export_view_pdf/static/description/assets/icons/gear.svg new file mode 100755 index 000000000..0cc66b6ea --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/hero.gif b/export_view_pdf/static/description/assets/icons/hero.gif new file mode 100755 index 000000000..380654dfe Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/hero.gif differ diff --git a/export_view_pdf/static/description/assets/icons/hire-odoo.svg b/export_view_pdf/static/description/assets/icons/hire-odoo.svg new file mode 100755 index 000000000..e1ac089b0 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/hotel-black.png b/export_view_pdf/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/hotel-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/license.png b/export_view_pdf/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/license.png differ diff --git a/export_view_pdf/static/description/assets/icons/life-ring-icon.svg b/export_view_pdf/static/description/assets/icons/life-ring-icon.svg new file mode 100755 index 000000000..3ae6e1d89 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/lifebuoy.png b/export_view_pdf/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/lifebuoy.png differ diff --git a/export_view_pdf/static/description/assets/icons/mail.svg b/export_view_pdf/static/description/assets/icons/mail.svg new file mode 100755 index 000000000..1eedde695 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/export_view_pdf/static/description/assets/icons/manufacturing-black.png b/export_view_pdf/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/manufacturing-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/notes.png b/export_view_pdf/static/description/assets/icons/notes.png new file mode 100755 index 000000000..ee5e95404 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/notes.png differ diff --git a/export_view_pdf/static/description/assets/icons/notification icon.svg b/export_view_pdf/static/description/assets/icons/notification icon.svg new file mode 100755 index 000000000..053189973 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/odoo-consultancy.svg b/export_view_pdf/static/description/assets/icons/odoo-consultancy.svg new file mode 100755 index 000000000..e05f65bde --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/export_view_pdf/static/description/assets/icons/odoo-licencing.svg b/export_view_pdf/static/description/assets/icons/odoo-licencing.svg new file mode 100755 index 000000000..2606c88b0 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/export_view_pdf/static/description/assets/icons/odoo-logo.png b/export_view_pdf/static/description/assets/icons/odoo-logo.png new file mode 100755 index 000000000..0e4d0eb5a Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/odoo-logo.png differ diff --git a/export_view_pdf/static/description/assets/icons/patter.svg b/export_view_pdf/static/description/assets/icons/patter.svg new file mode 100755 index 000000000..25c9c0a8f --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/pattern1.png b/export_view_pdf/static/description/assets/icons/pattern1.png new file mode 100755 index 000000000..09ab0fb2d Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/pattern1.png differ diff --git a/export_view_pdf/static/description/assets/icons/pos-black.png b/export_view_pdf/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/pos-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/puzzle-piece-icon.svg b/export_view_pdf/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100755 index 000000000..3e9ad9373 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/puzzle.png b/export_view_pdf/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/puzzle.png differ diff --git a/export_view_pdf/static/description/assets/icons/replace-icon.svg b/export_view_pdf/static/description/assets/icons/replace-icon.svg new file mode 100755 index 000000000..d0e3a7af1 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/restaurant-black.png b/export_view_pdf/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/restaurant-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/screenshot-main.png b/export_view_pdf/static/description/assets/icons/screenshot-main.png new file mode 100755 index 000000000..575f8e676 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/screenshot-main.png differ diff --git a/export_view_pdf/static/description/assets/icons/screenshot.png b/export_view_pdf/static/description/assets/icons/screenshot.png new file mode 100755 index 000000000..cef272529 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/screenshot.png differ diff --git a/export_view_pdf/static/description/assets/icons/service-black.png b/export_view_pdf/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/service-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/skype-fill.svg b/export_view_pdf/static/description/assets/icons/skype-fill.svg new file mode 100755 index 000000000..c17423639 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/skype.png b/export_view_pdf/static/description/assets/icons/skype.png new file mode 100755 index 000000000..51b409fb3 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/skype.png differ diff --git a/export_view_pdf/static/description/assets/icons/skype.svg b/export_view_pdf/static/description/assets/icons/skype.svg new file mode 100755 index 000000000..df3dad39b --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/export_view_pdf/static/description/assets/icons/star-1.svg b/export_view_pdf/static/description/assets/icons/star-1.svg new file mode 100755 index 000000000..7e55ab162 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/star-2.svg b/export_view_pdf/static/description/assets/icons/star-2.svg new file mode 100755 index 000000000..5ae9f507a --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/support.png b/export_view_pdf/static/description/assets/icons/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/support.png differ diff --git a/export_view_pdf/static/description/assets/icons/test-1 - Copy.png b/export_view_pdf/static/description/assets/icons/test-1 - Copy.png new file mode 100755 index 000000000..f6a902663 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/test-1 - Copy.png differ diff --git a/export_view_pdf/static/description/assets/icons/test-1.png b/export_view_pdf/static/description/assets/icons/test-1.png new file mode 100755 index 000000000..0908add2b Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/test-1.png differ diff --git a/export_view_pdf/static/description/assets/icons/test-2.png b/export_view_pdf/static/description/assets/icons/test-2.png new file mode 100755 index 000000000..4671fe91e Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/test-2.png differ diff --git a/export_view_pdf/static/description/assets/icons/trading-black.png b/export_view_pdf/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/trading-black.png differ diff --git a/export_view_pdf/static/description/assets/icons/training.png b/export_view_pdf/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/training.png differ diff --git a/export_view_pdf/static/description/assets/icons/translate.svg b/export_view_pdf/static/description/assets/icons/translate.svg new file mode 100755 index 000000000..af9c8a1aa --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/update.png b/export_view_pdf/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/update.png differ diff --git a/export_view_pdf/static/description/assets/icons/user.png b/export_view_pdf/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/user.png differ diff --git a/export_view_pdf/static/description/assets/icons/video.png b/export_view_pdf/static/description/assets/icons/video.png new file mode 100755 index 000000000..576705b17 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/video.png differ diff --git a/export_view_pdf/static/description/assets/icons/whatsapp.png b/export_view_pdf/static/description/assets/icons/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/whatsapp.png differ diff --git a/export_view_pdf/static/description/assets/icons/wrench-icon.svg b/export_view_pdf/static/description/assets/icons/wrench-icon.svg new file mode 100755 index 000000000..174b5a465 --- /dev/null +++ b/export_view_pdf/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/export_view_pdf/static/description/assets/icons/wrench.png b/export_view_pdf/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/export_view_pdf/static/description/assets/icons/wrench.png differ diff --git a/export_view_pdf/static/description/assets/modules/1.jpg b/export_view_pdf/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..3cb15fe01 Binary files /dev/null and b/export_view_pdf/static/description/assets/modules/1.jpg differ diff --git a/export_view_pdf/static/description/assets/modules/2.jpg b/export_view_pdf/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..662cadcc3 Binary files /dev/null and b/export_view_pdf/static/description/assets/modules/2.jpg differ diff --git a/export_view_pdf/static/description/assets/modules/3.jpg b/export_view_pdf/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..717a00443 Binary files /dev/null and b/export_view_pdf/static/description/assets/modules/3.jpg differ diff --git a/export_view_pdf/static/description/assets/modules/4.png b/export_view_pdf/static/description/assets/modules/4.png new file mode 100644 index 000000000..00ebf54ad Binary files /dev/null and b/export_view_pdf/static/description/assets/modules/4.png differ diff --git a/export_view_pdf/static/description/assets/modules/5.jpg b/export_view_pdf/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..7c67e2eec Binary files /dev/null and b/export_view_pdf/static/description/assets/modules/5.jpg differ diff --git a/export_view_pdf/static/description/assets/modules/6.gif b/export_view_pdf/static/description/assets/modules/6.gif new file mode 100644 index 000000000..a35ece8df Binary files /dev/null and b/export_view_pdf/static/description/assets/modules/6.gif differ diff --git a/export_view_pdf/static/description/assets/screenshots/1.png b/export_view_pdf/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..3d078fdbf Binary files /dev/null and b/export_view_pdf/static/description/assets/screenshots/1.png differ diff --git a/export_view_pdf/static/description/assets/screenshots/2.png b/export_view_pdf/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..949bd0beb Binary files /dev/null and b/export_view_pdf/static/description/assets/screenshots/2.png differ diff --git a/export_view_pdf/static/description/assets/screenshots/3.png b/export_view_pdf/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..1a5874ad5 Binary files /dev/null and b/export_view_pdf/static/description/assets/screenshots/3.png differ diff --git a/export_view_pdf/static/description/assets/screenshots/4.png b/export_view_pdf/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..0b1463762 Binary files /dev/null and b/export_view_pdf/static/description/assets/screenshots/4.png differ diff --git a/export_view_pdf/static/description/assets/screenshots/Gif.gif b/export_view_pdf/static/description/assets/screenshots/Gif.gif new file mode 100644 index 000000000..ba94249dd Binary files /dev/null and b/export_view_pdf/static/description/assets/screenshots/Gif.gif differ diff --git a/export_view_pdf/static/description/assets/y18.jpg b/export_view_pdf/static/description/assets/y18.jpg new file mode 100755 index 000000000..eea1714f2 Binary files /dev/null and b/export_view_pdf/static/description/assets/y18.jpg differ diff --git a/export_view_pdf/static/description/banner.jpg b/export_view_pdf/static/description/banner.jpg new file mode 100644 index 000000000..41d4b7d0e Binary files /dev/null and b/export_view_pdf/static/description/banner.jpg differ diff --git a/export_view_pdf/static/description/icon.png b/export_view_pdf/static/description/icon.png new file mode 100644 index 000000000..605448066 Binary files /dev/null and b/export_view_pdf/static/description/icon.png differ diff --git a/export_view_pdf/static/description/index.html b/export_view_pdf/static/description/index.html new file mode 100644 index 000000000..cb559a3d7 --- /dev/null +++ b/export_view_pdf/static/description/index.html @@ -0,0 +1,976 @@ + + + + + + Export View PDF + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+
+

+ Export Current List View in PDF Format. +

+

Export View PDF +

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

Key + Highlights

+
+
+
+
+ +
+
+ Export Tree View in PDF Format +
+

+ Generate PDF reports using list view.

+
+
+
+
+
+ +
+
+ Field Selection +
+

+ Select the desired field and Export. +

+
+
+
+
+
+ +
+
+ User Friendly +
+

+ Easy to access the features. +

+
+
+
+
+ +
+
+
+ Export View PDF +

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

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

+ Export Pdf Option + + +

+
+
+

+ In the List View user can see an option for Export Pdf. +

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

+ Select Fields + + +

+
+
+

+ When click on the menu it will open a dialog box to select fields to export. +

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

+ Export Fields + +

+
+
+

+ Select the desired Field and click on the Export Button. +

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

+ PDF Report + + +

+
+
+

+ On clicking the Export Button corresponding List view will be exported in PDF Format. +

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

+ Export Tree View in PDF Format.

+
+ +
+
+
+
+
+
+ +
+

+ Select the desired field and Export

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

+ Go to the list view, click the Settings button, and select "Export to PDF" to generate the PDF. +

+
+
+ +
+ +
+

+ Yes, you can customize the fields in pdf report adjust fields and design. +

+
+
+ +
+ +
+

+ Yes, any applied filters will be reflected in the PDF export, allowing you to export only the filtered data. +

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

+ Latest Release 18.0.1.0.0 +

+ + 2oth November, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/export_view_pdf/static/src/js/export_dialog.js b/export_view_pdf/static/src/js/export_dialog.js new file mode 100644 index 000000000..ec350e28b --- /dev/null +++ b/export_view_pdf/static/src/js/export_dialog.js @@ -0,0 +1,76 @@ +/** @odoo-module */ + +import { Dialog } from "@web/core/dialog/dialog"; +import { _t } from "@web/core/l10n/translation"; +import { useChildRef } from "@web/core/utils/hooks"; +import { Component } from "@odoo/owl"; + +// extending the dialog component to add the export dialog +export class ExportDialog extends Component { + setup() { + this.env.dialogData.dismiss = () => this._cancel(); + this.modalRef = useChildRef(); + this.isProcess = false; + } + async _cancel() { + return this.execButton(this.props.cancel); + } + async _confirm() { + return this.execButton(this.props.confirm); + } + setButtonsDisabled(disabled) { + this.isProcess = disabled; + if (!this.modalRef.el) { + return; // safety belt for stable versions + } + for (const button of [...this.modalRef.el.querySelectorAll(".modal-footer button")]) { + button.disabled = disabled; + } + } + async execButton(callback) { + if (this.isProcess) { + return; + } + this.setButtonsDisabled(true); + if (callback) { + let shouldClose; + try { + shouldClose = await callback(); + } catch (e) { + this.props.close(); + throw e; + } + if (shouldClose === false) { + this.setButtonsDisabled(false); + return; + } + } + this.props.close(); + } +} +// setting properties of ExportDialog +ExportDialog.template = "ExportPdf.List"; +ExportDialog.components = { Dialog }; +ExportDialog.props = { + close: Function, + title: { + validate: (m) => { + return ( + typeof m === "string" || (typeof m === "object" && typeof m.toString === "function") + ); + }, + optional: true, + }, + body: String, + confirm: { type: Function, optional: true }, + confirmLabel: { type: String, optional: true }, + confirmClass: { type: String, optional: true }, + cancel: { type: Function, optional: true }, + cancelLabel: { type: String, optional: true }, +}; +ExportDialog.defaultProps = { + confirmLabel: _t("Export"), + cancelLabel: _t("Cancel"), + confirmClass: "btn-primary", + title: _t("Export PDF"), +}; diff --git a/export_view_pdf/static/src/js/pdf_export.js b/export_view_pdf/static/src/js/pdf_export.js new file mode 100644 index 000000000..834d5bf06 --- /dev/null +++ b/export_view_pdf/static/src/js/pdf_export.js @@ -0,0 +1,87 @@ +/** @odoo-module **/ + +import { DropdownItem } from "@web/core/dropdown/dropdown_item"; +import { registry } from "@web/core/registry"; +//import { ListController } from '@web/views/list/list_controller'; +import { exprToBoolean } from "@web/core/utils/strings"; +import { STATIC_ACTIONS_GROUP_NUMBER } from "@web/search/action_menus/action_menus"; +import { _t } from "@web/core/l10n/translation"; +import { rpc } from "@web/core/network/rpc"; +import { ExportDialog } from "./export_dialog"; +import { Component } from "@odoo/owl"; +import { user } from "@web/core/user"; +const cogMenuRegistry = registry.category("cogMenu"); +/** + * 'Export PDF' menu + * + * This component is used to export PDF the records for particular model. + * @extends Component + */ +export class ExportPdf extends Component { + static template = "web.ExportPdf"; + static components = { DropdownItem }; + //--------------------------------------------------------------------- + // Protected + //--------------------------------------------------------------------- +// method to define the functionality when clicking on the export pdf menu + async onDirectExportPdf() { + this.env.searchModel.trigger('direct-export-pdf'); + const exportField = []; + const exportedFields = Object.values(this.env.model.config.fields).map(field => ({ + name: field.name, // Assuming `field` has a `name` property + label: field.label || field.string, // Use field properties like label or string + })); + const resIds = await this.env.model.root.getResIds(); + this.env.model.dialog.add(ExportDialog, { + title: _t("Export PDF"), + context: exportedFields, + confirm: async () => { + let checkboxes = document.querySelectorAll(`#${'check'} input[type="checkbox"]`); + checkboxes.forEach(item => { + if (item.checked === true){ + exportField.push({name:item.name,label:item.value}) + } + }); + var length_field = Array.from(Array(exportField.length).keys()); + await rpc('/get_data',{ + 'model':this.env.model.config.resModel, + 'res_ids':resIds.length > 0 && resIds, + 'fields':exportField, + 'grouped_by':this.env.model.config.groupBy, + 'context': this.env.model.config.context, + 'domain':this.env.model.config.domain, + }).then(data => { + if (this.env.model.config.groupBy[0]){ + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name':'export_view_pdf.export_in_pdf_group_by', + 'data':{'length':length_field,'group_len':[0,1,2,3],'record':data,} + }; + } + else{ + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name':'export_view_pdf.export_in_pdf', + 'data':{'length':length_field,'record':data} + }; + } + return this.env.model.action.doAction(action); + }); + }, + cancel: () => {}, + }); + } +} +// for adding export pdf menu item +export const exportPdfItem = { + Component: ExportPdf, + groupNumber: STATIC_ACTIONS_GROUP_NUMBER, + isDisplayed: async (env) => + env.config.viewType === "list" && + !env.model.root.selection.length && + await user.hasGroup("base.group_allow_export") && + exprToBoolean(env.config.viewArch.getAttribute("export_xlsx"), true), +}; +cogMenuRegistry.add("export-pdf-menu", exportPdfItem, { sequence: 10 }); diff --git a/export_view_pdf/static/src/xml/export_dialog.xml b/export_view_pdf/static/src/xml/export_dialog.xml new file mode 100644 index 000000000..cc15dc1d5 --- /dev/null +++ b/export_view_pdf/static/src/xml/export_dialog.xml @@ -0,0 +1,23 @@ + + + + + +
+

SELECT FIELDS

+ +
+ + +
+
+
+ +
+
+
diff --git a/export_view_pdf/static/src/xml/export_pdf_dropdown.xml b/export_view_pdf/static/src/xml/export_pdf_dropdown.xml new file mode 100644 index 000000000..78cff38fd --- /dev/null +++ b/export_view_pdf/static/src/xml/export_pdf_dropdown.xml @@ -0,0 +1,10 @@ + + + + + + Export PDF + + + +