diff --git a/custom_report_template/__init__.py b/custom_report_template/__init__.py new file mode 100755 index 000000000..0650744f6 --- /dev/null +++ b/custom_report_template/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/custom_report_template/__manifest__.py b/custom_report_template/__manifest__.py new file mode 100755 index 000000000..99860cfc4 --- /dev/null +++ b/custom_report_template/__manifest__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Muhammed Nishad TK() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + 'name': "Customizable Report Template", + 'version': '11.0.1.0.0', + 'summary': """Customize Your Reports Layout""", + 'description': """Customize Your Reports Layout""", + 'author': "Cybrosys Techno Solutions", + 'maintainer': 'Cybrosys Techno Solutions', + 'company': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'category': 'Tools', + 'depends': ['base', 'web_widget_colorpicker', 'sale_management', 'purchase', 'stock', 'account_invoicing'], + 'images': ['static/description/banner.jpg'], + 'data': [ + 'views/view.xml', + ], + 'license': 'AGPL-3', + 'appliction': False, + 'installable': True +} \ No newline at end of file diff --git a/custom_report_template/doc/RELEASE_NOTES.md b/custom_report_template/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..dcf99d4f2 --- /dev/null +++ b/custom_report_template/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 09.10.2018 +#### Version 11.0.1.0.0 +##### ADD +- Initial commit for Custom Report Module \ No newline at end of file diff --git a/custom_report_template/models/__init__.py b/custom_report_template/models/__init__.py new file mode 100755 index 000000000..9186ee3ad --- /dev/null +++ b/custom_report_template/models/__init__.py @@ -0,0 +1 @@ +from . import model diff --git a/custom_report_template/models/model.py b/custom_report_template/models/model.py new file mode 100755 index 000000000..3e2cbf34b --- /dev/null +++ b/custom_report_template/models/model.py @@ -0,0 +1,56 @@ +from odoo import models, fields, api + + +class ResCompany(models.Model): + _inherit = 'res.company' + + report_background = fields.Char(string="Report Background", default="rgba(255,255,255,1)") + header_background = fields.Char(string="Header Background", default="rgba(255,255,255,1)") + address_color = fields.Char(string="Company Address Colour") + table_header_background = fields.Char(string="Table Header Background", default="rgba(255,255,255,1)") + table_header_color = fields.Char(string="Table Header Color") + table_header_font = fields.Char(string="Table Header Size") + table_data_background = fields.Char(string="Table Data Background", default="rgba(255,255,255,1)") + table_data_color = fields.Char(string="Table Data Colour") + table_data_font = fields.Char(string="Table Data Size") + header_color = fields.Char(string="Header Colour") + header_alignment = fields.Selection([('center', 'Center'), + ('left', 'Left'), + ('right', 'Right'), + ], string="Header Alignment") + logo_alignment = fields.Selection([('center', 'Center'), + ('left', 'Left'), + ('right', 'Right'), + ], string="Logo Alignment") + address_alignment = fields.Selection([('center', 'Center'), + ('left', 'Left'), + ('right', 'Right'), + ], string="Company Address Alignment") + table_header_alignment = fields.Selection([('center', 'Center'), + ('left', 'Left'), + ('right', 'Right'), + ], string="Table Header Alignment") + table_data_alignment = fields.Selection([('center', 'Center'), + ('left', 'Left'), + ('right', 'Right'), + ], string="Table Data Alignment") + + +class CustomReportConfig(models.TransientModel): + _inherit = 'res.config.settings' + + report_background = fields.Char(related="company_id.report_background", string="Report Background", default="rgba(255,255,255,1)") + header_background = fields.Char(related="company_id.header_background", string="Header Background", default="rgba(255,255,255,1)") + header_alignment = fields.Selection(related="company_id.header_alignment", string="Header Alignment") + header_color = fields.Char(related="company_id.header_color") + logo_alignment = fields.Selection(related="company_id.logo_alignment") + address_alignment = fields.Selection(related="company_id.address_alignment") + address_color = fields.Char(related="company_id.address_color") + table_header_background = fields.Char(related="company_id.table_header_background", default="rgba(255,255,255,1)") + table_header_color = fields.Char(related="company_id.table_header_color") + table_header_font = fields.Char(related="company_id.table_header_font") + table_data_background = fields.Char(related="company_id.table_data_background", default="rgba(255,255,255,1)") + table_data_color = fields.Char(related="company_id.table_data_color") + table_data_font = fields.Char(related="company_id.table_data_font") + table_header_alignment = fields.Selection(related="company_id.table_header_alignment") + table_data_alignment = fields.Selection(related="company_id.table_data_alignment") diff --git a/custom_report_template/readme.rst b/custom_report_template/readme.rst new file mode 100755 index 000000000..3219d46d2 --- /dev/null +++ b/custom_report_template/readme.rst @@ -0,0 +1,31 @@ +====================== +Custom Report Template +====================== +The Custom Report Template Module Helps You to Customize PDF Reports +It have options to change foreground and background colours, Change +alignment of text and change the font size +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/11.0/setup/install.html +- Install our custom addon + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. + diff --git a/custom_report_template/static/description/HRMS-BUTTON.png b/custom_report_template/static/description/HRMS-BUTTON.png new file mode 100755 index 000000000..0f1b65bea Binary files /dev/null and b/custom_report_template/static/description/HRMS-BUTTON.png differ diff --git a/custom_report_template/static/description/banner.jpg b/custom_report_template/static/description/banner.jpg new file mode 100755 index 000000000..d42c44cad Binary files /dev/null and b/custom_report_template/static/description/banner.jpg differ diff --git a/custom_report_template/static/description/cybro-service.png b/custom_report_template/static/description/cybro-service.png new file mode 100755 index 000000000..252929a86 Binary files /dev/null and b/custom_report_template/static/description/cybro-service.png differ diff --git a/custom_report_template/static/description/cybro_logo.png b/custom_report_template/static/description/cybro_logo.png new file mode 100755 index 000000000..bb309114c Binary files /dev/null and b/custom_report_template/static/description/cybro_logo.png differ diff --git a/custom_report_template/static/description/icon.png b/custom_report_template/static/description/icon.png new file mode 100755 index 000000000..08c371273 Binary files /dev/null and b/custom_report_template/static/description/icon.png differ diff --git a/custom_report_template/static/description/image1.png b/custom_report_template/static/description/image1.png new file mode 100755 index 000000000..b30de6368 Binary files /dev/null and b/custom_report_template/static/description/image1.png differ diff --git a/custom_report_template/static/description/image2.png b/custom_report_template/static/description/image2.png new file mode 100755 index 000000000..e339122f4 Binary files /dev/null and b/custom_report_template/static/description/image2.png differ diff --git a/custom_report_template/static/description/image4.png b/custom_report_template/static/description/image4.png new file mode 100755 index 000000000..ef6dfb2d0 Binary files /dev/null and b/custom_report_template/static/description/image4.png differ diff --git a/custom_report_template/static/description/image5.png b/custom_report_template/static/description/image5.png new file mode 100755 index 000000000..b4def99f6 Binary files /dev/null and b/custom_report_template/static/description/image5.png differ diff --git a/custom_report_template/static/description/index.html b/custom_report_template/static/description/index.html new file mode 100755 index 000000000..88df2d3c1 --- /dev/null +++ b/custom_report_template/static/description/index.html @@ -0,0 +1,101 @@ +
+
+

Custom report Template

+

Customize PDF Report Styles

+

Cybrosys Technologies

+
+
+
+ Stand out from the herd with a professionally designed report. Cybrosys Technologies helps you in crafting the finest eye-appealing report via our module, ”Customizable Report Template”. + +No matter what your report is all about, we help you in presenting them clearly and beautifully. We help you to customize PDF reports based on configurations. +
+
+
+
+ ☛ Installation : To install this module, you also need the account_invoicing,sale_management,stock and web_widget_colorpicker modules. + It works well with WKHTMLTOPDF 0.12.1. +
+
+
+
+
+ +
+
+
+

+ Go to Settings -> General Settings -> Customize Report. + Select the desired color, alignment and font size you need. Later click, ”Save” and print reports. +

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

+ Here you can see the table header colour and the report header colour is changed. +

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

+ Here the header alignment and the report background is changed. +

+
+
+
+ +
+
+
+
+ +
+

Need Any Help?

+ +
+ + + diff --git a/custom_report_template/views/view.xml b/custom_report_template/views/view.xml new file mode 100755 index 000000000..97aeebbce --- /dev/null +++ b/custom_report_template/views/view.xml @@ -0,0 +1,436 @@ + + + + + res.config.settings.custom.report.theme.form + res.config.settings + + + + +
+
+

Customize Report

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
\ No newline at end of file