@ -0,0 +1,43 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
Custom Pivot Report |
||||
|
=================== |
||||
|
This module Create Custom Pivot Report For Any Model Without Coding |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (LGPL v3). |
||||
|
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
Developer:(V18) SAFA FAHEEM PE @cybrosys, |
||||
|
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,23 @@ |
|||||
|
# -*- 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 models |
||||
|
from .hooks import report_uninstall_hook |
@ -0,0 +1,44 @@ |
|||||
|
# -*- 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 Pivot Report', |
||||
|
'version': '18.0.1.0.0', |
||||
|
"category": "Extra Tools", |
||||
|
"summary": """Create Custom Pivot Report For Any Model Without Coding""", |
||||
|
"description": """Create Custom Pivot Report For Any Model Without Coding, |
||||
|
Dynamic Pivot Report, Custom Pivot Report, Dynamic Report, Pivot View""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'depends': ['base'], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/custom_report_views.xml', |
||||
|
], |
||||
|
'images': ['static/description/banner.gif'], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
'uninstall_hook': 'report_uninstall_hook' |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
## Module <custom_pivot_report> |
||||
|
|
||||
|
#### 20.01.2025 |
||||
|
#### Version 17.0.1.0.0 |
||||
|
#### ADD |
||||
|
- Initial commit for Custom Pivot Report |
@ -0,0 +1,27 @@ |
|||||
|
# -*- 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/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
def report_uninstall_hook(env): |
||||
|
# Uninstall hook to delete all the custom pivot reports |
||||
|
records = env['custom.report'].search([]) |
||||
|
for record in records: |
||||
|
record.unlink() |
@ -0,0 +1,26 @@ |
|||||
|
# -*- 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 ir_actions_act_window |
||||
|
from . import ir_ui_menu |
||||
|
from . import ir_ui_view |
||||
|
from . import custom_report |
||||
|
from . import custom_report_fields |
@ -0,0 +1,134 @@ |
|||||
|
# -*- 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 api, fields, models, _ |
||||
|
|
||||
|
|
||||
|
class CustomReport(models.Model): |
||||
|
"""Custom report model for creating pivot view and adding required |
||||
|
fields for the model""" |
||||
|
_name = 'custom.report' |
||||
|
_description = 'Custom Report' |
||||
|
|
||||
|
name = fields.Char(string='Name', help="Name of the pivot report") |
||||
|
model_id = fields.Many2one('ir.model', string='Model', |
||||
|
required=True, |
||||
|
domain="[('transient', '=', False),]", |
||||
|
ondelete='cascade', |
||||
|
help="Select the model for the report") |
||||
|
fields_ids = fields.One2many('custom.report.fields', |
||||
|
'report_id', string='Fields', |
||||
|
required=True, |
||||
|
help="Select the field that is added to the custom report.") |
||||
|
menu_id = fields.Many2one('ir.ui.menu', string='Menu', |
||||
|
required=True, ondelete='cascade', |
||||
|
help="The menu where you want to create a new menu item.") |
||||
|
menu_group_id = fields.Many2many('res.groups', |
||||
|
string='Menu Group', required=True, |
||||
|
ondelete='cascade', |
||||
|
help="Set the user group who hav access to the report menu") |
||||
|
view_type = fields.Selection([('pivot', 'Pivot'), |
||||
|
('graph', 'Graph')], string='View Type', |
||||
|
help="Select the type of report") |
||||
|
|
||||
|
def unlink(self): |
||||
|
"""Customized unlink method to clean up related records.""" |
||||
|
for rec in self: |
||||
|
# Searching the view |
||||
|
view = self.env['ir.ui.view'].search( |
||||
|
[('custom_report', '=', str(rec.id) + '_' + rec.model_id.model + '_' + rec.menu_id.complete_name)]) |
||||
|
# search the action |
||||
|
action = self.env['ir.actions.act_window'].search( |
||||
|
[('custom_report', '=', str(rec.id) + '_' + 'pivot' + '_' + '_' + 'current',)]) |
||||
|
# search the menu |
||||
|
menu = self.env['ir.ui.menu'].search( |
||||
|
[('custom_report', '=', str(rec.id) + '_' + rec.menu_id.complete_name + '_' + rec.model_id.model)]) |
||||
|
view.sudo().unlink() |
||||
|
action.sudo().unlink() |
||||
|
menu.sudo().unlink() |
||||
|
return super().unlink() |
||||
|
|
||||
|
@api.constrains('menu_id', 'fields_ids', 'model_id', 'name', 'menu_group_id') |
||||
|
def _create_menu_id(self): |
||||
|
"""Customized constraint method to create or update menu, action, and |
||||
|
view""" |
||||
|
view_id = self.env['ir.ui.view'].search( |
||||
|
[('custom_report', '=', str(self.id) + '_' + self.model_id.model + '_' + self.menu_id.complete_name)]) |
||||
|
arch_base = '''<pivot string="%s" sample="1">\n''' % (self.name) |
||||
|
for rec in self.fields_ids: |
||||
|
if rec.row: |
||||
|
arch_base += ''' |
||||
|
<field name="%s" type="row" string="%s"/>\n''' % (rec.custom_field_id.name, rec.label) |
||||
|
elif rec.measure: |
||||
|
arch_base += ''' |
||||
|
<field name="%s" type="measure" string="%s"/>\n''' % (rec.custom_field_id.name, rec.label) |
||||
|
else: |
||||
|
arch_base += '''<field name="%s" string="%s" />\n''' % (rec.custom_field_id.name, rec.label) |
||||
|
|
||||
|
arch_base += '''</pivot>\n''' |
||||
|
view_value = { |
||||
|
'name': _(self.name), |
||||
|
'type': 'pivot', |
||||
|
'custom_report': str(self.id) + '_' + self.model_id.model + '_' + self.menu_id.complete_name, |
||||
|
'model': self.model_id.model, |
||||
|
'mode': 'primary', |
||||
|
'active': True, |
||||
|
'arch_base': arch_base, |
||||
|
'groups_id': [(6, 0, [self.menu_group_id.id])], |
||||
|
} |
||||
|
if not view_id: |
||||
|
# Creating the view |
||||
|
view_obj = self.env['ir.ui.view'].create(view_value) |
||||
|
else: |
||||
|
view_id.sudo().write(view_value) |
||||
|
view_obj = view_id |
||||
|
value = { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': _(self.name), |
||||
|
'res_model': self.model_id.model, |
||||
|
'custom_report': str(self.id) + '_' + 'pivot' + '_' + '_' + 'current', |
||||
|
'view_mode': 'pivot', |
||||
|
'view_id': view_obj.id, |
||||
|
'target': 'current', |
||||
|
} |
||||
|
action_id = self.env['ir.actions.act_window'].search( |
||||
|
[('custom_report', '=', str(self.id) + '_' + 'pivot' + '_' + '_' + 'current')]) |
||||
|
if not action_id: |
||||
|
# Creating the action |
||||
|
action = self.env['ir.actions.act_window'].create(value) |
||||
|
else: |
||||
|
action_id.sudo().write(value) |
||||
|
action = action_id |
||||
|
value = { |
||||
|
'name': self.name, |
||||
|
'complete_name': self.menu_id.complete_name + '/' + self.name, |
||||
|
'action': 'ir.actions.act_window,%s' % (action.id), |
||||
|
'parent_id': self.menu_id.id, |
||||
|
'custom_report': str(self.id) + '_' + self.menu_id.complete_name + '_' + self.model_id.model, |
||||
|
'groups_id': [(6, 0, [self.menu_group_id.id])], |
||||
|
} |
||||
|
menu_id = self.env['ir.ui.menu'].search( |
||||
|
[('custom_report', '=', str(self.id) + '_' + self.menu_id.complete_name + '_' + self.model_id.model)]) |
||||
|
if not menu_id: |
||||
|
# Creating the menu |
||||
|
menu = self.env['ir.ui.menu'].create(value) |
||||
|
else: |
||||
|
menu_id.sudo().write(value) |
@ -0,0 +1,59 @@ |
|||||
|
# -*- 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 api, fields, models |
||||
|
|
||||
|
|
||||
|
class CustomReportFields(models.Model): |
||||
|
"""Custom report fields model. |
||||
|
Used to define custom fields associated with custom reports.""" |
||||
|
_name = 'custom.report.fields' |
||||
|
_description = 'Custom Report Fields' |
||||
|
|
||||
|
custom_field_id = fields.Many2one('ir.model.fields', |
||||
|
string='Custom Report', |
||||
|
required=True, ondelete='cascade', |
||||
|
domain="[('model_id', '=', model_id)]", |
||||
|
help="Field adding to the report") |
||||
|
report_id = fields.Many2one('custom.report', string='Parent', |
||||
|
ondelete='cascade') |
||||
|
model_id = fields.Many2one('ir.model', |
||||
|
related='report_id.model_id', |
||||
|
help="Model for the report") |
||||
|
label = fields.Char(string='Label', |
||||
|
help="Label of the column in the report") |
||||
|
row = fields.Boolean(string='Row', default=0, |
||||
|
help="Define is the field is row") |
||||
|
measure = fields.Boolean(string='Measure', default=0, |
||||
|
help="Define is the field is measure") |
||||
|
measurable = fields.Boolean(string='Measurable', default=0, |
||||
|
help="Define is the field is row") |
||||
|
rowable = fields.Boolean(string='Row able', default=0, |
||||
|
help="Define is the field is measure") |
||||
|
|
||||
|
@api.onchange('custom_field_id') |
||||
|
def onchange_custom_field_id(self): |
||||
|
"""Update field values based on the selected custom field.""" |
||||
|
self.label = self.custom_field_id.field_description |
||||
|
if self.custom_field_id.ttype in ['float', 'integer', 'many2one', 'monetary']: |
||||
|
self.measurable = True |
||||
|
if self.custom_field_id.ttype in ['many2many', 'one2many']: |
||||
|
self.rowable = True |
@ -0,0 +1,29 @@ |
|||||
|
# -*- 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 fields, models |
||||
|
|
||||
|
|
||||
|
class IrActionsActWindow(models.Model): |
||||
|
"""Inheriting the 'ir.action.act.window' model.""" |
||||
|
_inherit = 'ir.actions.act_window' |
||||
|
|
||||
|
custom_report = fields.Char(string='Custom ID', help="Custom report") |
@ -0,0 +1,29 @@ |
|||||
|
# -*- 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 fields, models |
||||
|
|
||||
|
|
||||
|
class IrUiMenu(models.Model): |
||||
|
"""Inheriting the 'ir.ui.menu' model.""" |
||||
|
_inherit = 'ir.ui.menu' |
||||
|
|
||||
|
custom_report = fields.Char(string='Custom ID', help="Custom report") |
@ -0,0 +1,29 @@ |
|||||
|
# -*- 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 fields, models |
||||
|
|
||||
|
|
||||
|
class IrUiView(models.Model): |
||||
|
"""Inheriting the 'ir.ui.view' model.""" |
||||
|
_inherit = 'ir.ui.view' |
||||
|
|
||||
|
custom_report = fields.Char(string='Custom ID', help="Custom report") |
Can't render this file because it has a wrong number of fields in line 2.
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
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: 174 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: 912 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 222 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 187 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 9.8 KiB |
@ -0,0 +1,68 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- List view of the custom report--> |
||||
|
<record id="custom_report_view_tree" model="ir.ui.view"> |
||||
|
<field name="name">custom.report.view.list</field> |
||||
|
<field name="model">custom.report</field> |
||||
|
<field name="type">list</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<list> |
||||
|
<field name="name"/> |
||||
|
<field name="model_id"/> |
||||
|
<field name="menu_id"/> |
||||
|
</list> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Form view of custom report--> |
||||
|
<record id="custom_report_view_form" model="ir.ui.view"> |
||||
|
<field name="name">custom.report.view.form</field> |
||||
|
<field name="model">custom.report</field> |
||||
|
<field name="type">form</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Custom Report"> |
||||
|
<sheet> |
||||
|
<group> |
||||
|
<group> |
||||
|
<field name="name"/> |
||||
|
<field name="model_id"/> |
||||
|
</group> |
||||
|
<group> |
||||
|
<field name="menu_id"/> |
||||
|
<field name="menu_group_id" widget="many2many_tags"/> |
||||
|
</group> |
||||
|
<field name="fields_ids" context="{'parent_id':model_id}"> |
||||
|
<list editable="bottom"> |
||||
|
<field name="custom_field_id"/> |
||||
|
<field name="label"/> |
||||
|
<field name="report_id" column_invisible="1"/> |
||||
|
<field name="model_id" column_invisible="1 "/> |
||||
|
<field name="rowable" column_invisible="1"/> |
||||
|
<field name="measurable" column_invisible="1"/> |
||||
|
<field name="row" readonly="rowable"/> |
||||
|
<field name="measure" readonly="not measurable"/> |
||||
|
</list> |
||||
|
</field> |
||||
|
</group> |
||||
|
</sheet> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Action for custom report model--> |
||||
|
<record id="custom_report_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Custom Report</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">custom.report</field> |
||||
|
<field name="view_mode">list,form</field> |
||||
|
<field name="help" type="html"> |
||||
|
<p class="o_view_nocontent_smiling_face"> |
||||
|
Create record |
||||
|
</p> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Menu of custom report--> |
||||
|
<menuitem id="custom_report_menu" name="Custom Reports" |
||||
|
action="custom_report_action" web_icon="custom_pivot_report,static/description/icon.png"/> |
||||
|
</odoo> |