Browse Source

[ADD] Initial Commit 'project_report_pdf'

pull/164/head
Ajmal Cybro 5 years ago
parent
commit
6f9545647d
  1. 23
      project_report_pdf/README.rst
  2. 25
      project_report_pdf/__init__.py
  3. 43
      project_report_pdf/__manifest__.py
  4. 1
      project_report_pdf/controllers/__init__.py
  5. 36
      project_report_pdf/controllers/main.py
  6. 7
      project_report_pdf/doc/RELEASE_NOTES.md
  7. 22
      project_report_pdf/report/__init__.py
  8. 80
      project_report_pdf/report/project_report_pdf.py
  9. 44
      project_report_pdf/report/project_report_pdf_view.xml
  10. 2
      project_report_pdf/security/ir.model.access.csv
  11. BIN
      project_report_pdf/static/description/banner.png
  12. BIN
      project_report_pdf/static/description/icon.png
  13. BIN
      project_report_pdf/static/description/images/PDF report.png
  14. BIN
      project_report_pdf/static/description/images/PDF_report-1.png
  15. BIN
      project_report_pdf/static/description/images/XLS report.png
  16. BIN
      project_report_pdf/static/description/images/checked.png
  17. BIN
      project_report_pdf/static/description/images/coupon_pos.png
  18. BIN
      project_report_pdf/static/description/images/cybrosys.png
  19. BIN
      project_report_pdf/static/description/images/filter report.png
  20. BIN
      project_report_pdf/static/description/images/pos_6.png
  21. BIN
      project_report_pdf/static/description/images/pos_image.png
  22. BIN
      project_report_pdf/static/description/images/pos_logo.png
  23. BIN
      project_report_pdf/static/description/images/pos_reprint.png
  24. BIN
      project_report_pdf/static/description/images/pos_waiter.png
  25. BIN
      project_report_pdf/static/description/images/project.png
  26. 318
      project_report_pdf/static/description/index.html
  27. 48
      project_report_pdf/static/src/js/action_manager.js
  28. 10
      project_report_pdf/views/action_manager.xml
  29. 12
      project_report_pdf/views/project_report.xml
  30. 16
      project_report_pdf/views/project_report_button.xml
  31. 22
      project_report_pdf/wizard/__init__.py
  32. 175
      project_report_pdf/wizard/project_report_wizard.py
  33. 36
      project_report_pdf/wizard/project_report_wizard_view.xml

23
project_report_pdf/README.rst

@ -0,0 +1,23 @@
Project Report v14
==================
PDF and XLS Reports for Project Module.
Features
========
* Project Task Report XLS [With advanced Filtration]
* Project Task Report PDF [With advanced Filtration]
Credits
=======
Cybrosys Techno Solutions <www.cybrosys.com>
Author
------
* Developer v9: Avinash Nk @ cybrosys
* Developer v10: Treesa @ cybrosys
* Developer V11: Akshay @ cybrosys
* Developer V12: Akshay @ cybrosys
* Developer V13: Vinaya S B @ cybrosys
* Developer V14: Muhammed P @ cybrosys

25
project_report_pdf/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akshay Babu(<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import wizard
from . import controllers
from . import report

43
project_report_pdf/__manifest__.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': 'Project Report XLS & PDF',
'version': '14.0.1.0.0',
"category": "Project",
'author': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'maintainer': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'summary': """Advanced PDF & XLS Reports for Project With Filtrations""",
'description': """Advanced PDF & XLS Reports for Project With Filtrations, Odoo 14, Odoo14""",
'depends': ['base', 'project'],
'license': 'AGPL-3',
'data': ['security/ir.model.access.csv',
'views/action_manager.xml',
'wizard/project_report_wizard_view.xml',
'report/project_report_pdf_view.xml',
'views/project_report_button.xml',
'views/project_report.xml'
],
'images': ['static/description/banner.png'],
'installable': True,
'auto_install': False,
}

1
project_report_pdf/controllers/__init__.py

@ -0,0 +1 @@
from . import main

36
project_report_pdf/controllers/main.py

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import json
from odoo import http
from odoo.http import content_disposition, request
from odoo.addons.web.controllers.main import _serialize_exception
from odoo.tools import html_escape
class XLSXReportController(http.Controller):
@http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False)
def get_report_xlsx(self, model, options, output_format, token, report_name, **kw):
uid = request.session.uid
report_obj = request.env[model].with_user(uid)
options = json.loads(options)
try:
if output_format == 'xlsx':
response = request.make_response(
None,
headers=[
('Content-Type', 'application/vnd.ms-excel'),
('Content-Disposition', content_disposition(report_name + '.xlsx'))
]
)
report_obj.get_xlsx_report(options, response)
response.set_cookie('fileToken', token)
return response
except Exception as e:
se = _serialize_exception(e)
error = {
'code': 200,
'message': 'Odoo Server Error',
'data': se
}
return request.make_response(html_escape(json.dumps(error)))

7
project_report_pdf/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <project_report_pdf>
#### 3.10.2020
#### Version 14.0.1.0.0
##### ADD
- Initial commit for project_report_pdf

22
project_report_pdf/report/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akshay Babu(<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import project_report_pdf

80
project_report_pdf/report/project_report_pdf.py

@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo.http import request
from odoo import models, api
class ProjectReportParser(models.AbstractModel):
_name = 'report.project_report_pdf.project_report_template'
def _get_report_values(self, docids, data=None):
name = data['record']
wizard_record = request.env['wizard.project.report'].search([])[-1]
task_obj = request.env['project.task']
users_selected = []
stages_selected = []
for elements in wizard_record.partner_select:
users_selected.append(elements.id)
for elements in wizard_record.stage_select:
stages_selected.append(elements.id)
if wizard_record.partner_select:
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('user_id', 'in', users_selected),
('stage_id', 'in', stages_selected)])
else:
current_task = task_obj.search([('project_id', '=', name),
('user_id', 'in', users_selected)])
else:
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('stage_id', 'in', stages_selected)])
else:
current_task = task_obj.search([('project_id', '=', name)])
vals = []
for i in current_task:
vals.append({
'name': i.name,
'user_id': i.user_id.name,
'stage_id': i.stage_id.name,
})
if current_task:
return {
'vals': vals,
'name': current_task[0].project_id.name,
'manager': current_task[0].project_id.user_id.name,
'date_start': current_task[0].project_id.date_start,
'date_end': current_task[0].project_id.date,
}
else:
return {
'vals': vals,
'name': current_task.project_id.name,
'manager': current_task.project_id.user_id.name,
'date_start': current_task.project_id.date_start,
'date_end': current_task.project_id.date,
}

44
project_report_pdf/report/project_report_pdf_view.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="project_report_template">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page" >
<br/>
<div style="text-align:left;color:black!important;"><strong><h1>Project :<span t-esc="name"/></h1></strong></div>
<div style="text-align:left;color:black!important;"><strong><p>Project Manager:<span t-esc="manager"/></p></strong></div>
<div style="text-align:left;color:black!important;"><strong><p>Start Date:<span t-esc="date_start"/></p></strong></div>
<div style="text-align:left;color:black!important;"><strong><p>End Date:<span t-esc="date_end"/></p></strong></div>
<div style="text-align:left;color:black!important;"><strong><h1>Open Tasks</h1></strong></div>
<table class="table table-condensed">
<thead>
<tr >
<th style="text-align:left;color:black!important;">Task</th>
<th style="text-align:left;color:black!important;">Assigned</th>
<th style="text-align:left;color:black!important;">Stage</th>
</tr>
</thead>
<tbody>
<t t-foreach="vals" t-as="doc">
<tr>
<td>
<span t-att-style="style" t-esc="doc['name']"/>
</td>
<td>
<span t-att-style="style" t-esc="doc['user_id']"/>
</td>
<td>
<span t-att-style="style" t-esc="doc['stage_id']"/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</odoo>

2
project_report_pdf/security/ir.model.access.csv

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_wizard_project_report,wizard.project.report,model_wizard_project_report,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_wizard_project_report wizard.project.report model_wizard_project_report 1 1 1 1

BIN
project_report_pdf/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
project_report_pdf/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
project_report_pdf/static/description/images/PDF report.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
project_report_pdf/static/description/images/PDF_report-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
project_report_pdf/static/description/images/XLS report.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
project_report_pdf/static/description/images/checked.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
project_report_pdf/static/description/images/coupon_pos.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

BIN
project_report_pdf/static/description/images/cybrosys.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
project_report_pdf/static/description/images/filter report.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
project_report_pdf/static/description/images/pos_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
project_report_pdf/static/description/images/pos_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
project_report_pdf/static/description/images/pos_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
project_report_pdf/static/description/images/pos_reprint.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
project_report_pdf/static/description/images/pos_waiter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
project_report_pdf/static/description/images/project.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

318
project_report_pdf/static/description/index.html

@ -0,0 +1,318 @@
<div class="row" style="margin: 0;position: relative;color: #000;background-position: center;background: #ffffff;border-bottom: 1px solid #e4e4e4;text-align: center; margin: auto; display: flex;justify-content: center;"> <a href="https://www.cybrosys.com/" target="_blank"><img src="images/cybrosys.png" style=" width: 293px; padding: 1rem 0rem; margin: auto" alt="cybrosys-logo"></a> </div>
<div class="row" style="margin:75px 0;position: relative;color: #000;background-position: center;background: #ffffff;border-bottom: 1px solid #e4e4e4; padding-bottom: 30px;">
<div class="col-md-7 col-sm-12 col-xs-12" style="padding: 0px">
<div style=" margin: 0 0 0px;padding: 20px 0 10;font-size: 23px;line-height: 35px;font-weight: 400;color: #000;border-top: 1px solid rgba(255,255,255,0.1);border-bottom: 1px solid rgba(255,255,255,0.11);text-align: left;">
<h1 style="font-size: 39px;font-weight: 600;margin: 0px !important;">Project Report PDF & XLS </h1>
<h3 style="font-size: 21px;margin-top: 8px;position: relative;"> </h3>
</div>
<h2 style="font-weight: 600;font-size: 1.8rem;margin-top: 15px;">Key Highlights</h2>
<ul style=" padding: 0 1px; list-style: none; ">
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> PDF Reports in Project. </li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> XLS Reports in Project. </li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> Detailed Report on Tasks. </li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i>Advanced Filters for Report. </li>
</ul>
</div>
<div class="col-md-5 col-sm-12 col-xs-12"> <img src="images/PDF_report-1.png" class="img-responsive" alt=""> </div>
</div>
<div>
<section class="oe_container" style="padding: 1rem 0rem 1rem; background-color: #ffffff !important;">
<div class="row py-4 px-3">
<div class="w-100" style="padding-top:30px;padding-bottom:45px;border-radius: 10px;">
<ul role="tablist" class="nav nav-pills justify-content-center" data-tabs="tabs" id="pills-tab" style="border: none;background: unset;">
<li class="nav-item mr-1 mb-3" style="font-size: 1.05rem;font-weight: 400;transition: all .15s ease;color: #d31c22;background-color: #d31c22;box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);border: 0;font-family: 'Open Sans',sans-serif;width: 140px;border-radius: 0.30rem;"> <a id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true" class="nav-link active show" style="color: #000000;line-height: 33px;border: 0;border-radius: .25rem;font-weight: 400;text-align: center;
color: #fff;">Overview </a> </li>
<li class="nav-item mr-1 mb-3" style="font-size: 1.05rem;font-weight: 400;transition: all .15s ease;color: #d31c22;background-color: #d31c22;box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);border: 0;font-family: 'Open Sans',sans-serif;width: 140px;border-radius: 0.30rem;"> <a id="pills-home-tab" data-toggle="pill" href="#pills-home1" role="tab" aria-controls="pills-home" aria-selected="true" class="nav-link " style="color: #000000;line-height: 33px;border: 0;border-radius: .25rem;font-weight: 400; text-align: center;
color: #fff;" >Features </a> </li>
<li class="nav-item mr-1 mb-3" style="font-size: 1.05rem;font-weight: 400;transition: all .15s ease;color: #ffffff;background-color: #d31c22;box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);border: 0;font-family: 'Open Sans',sans-serif;width: 140px;border-radius: 0.30rem;"> <a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-profile" role="tab" aria-controls="pills-profile" aria-selected="false" style="color: #000000;line-height: 33px;border: 0;border-radius: .25rem;font-weight: 400; text-align: center;
color: #fff;">Screenshots </a> </li>
</ul>
<div class="tab-content" id="pills-tabContent"
style="padding-top: 30px; padding-bottom: 30px; padding: 30px;">
<div class="px-3 pt-1 tab-pane fade active show" id="pills-home" role="tabpanel" aria-labelledby="
pills-home-tab">
<!-- Overview-->
<h2 style="font-weight: 600;text-align: center;width: 100%;">Overview</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<h3 class="oe_slogan" style="text-align: center;font-size: 19px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 31px;font-weight: 400;letter-spacing: .5px;margin-bottom: 21px;">
This module enhances the project management with intuitive reports. Reports consist of task details with respect to the selected project. The user can use the filter facilities from report wizard to get the optimized reports.
</div>
<div class="px-3 pt-1 tab-pane fade " id="pills-home1" role="tabpanel" aria-labelledby="
pills-home-tab">
<!-- feature tab-->
<h2 style="font-weight: 600;text-align: center;width: 100%;"> Project Report PDF & XLS </h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<ul>
<p class="mb8" style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> PDF Reports in Project.
</p>
<p class="mb8" style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> XLS Reports in Project.
</p>
<p class="mb8" style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> Detailed Report on Tasks.
</p>
<p class="mb8" style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i>Advanced Filters for Report.
</p>
</ul>
</div>
<!-- Screenshot tab-->
<div class="px-3 tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab" >
<div class="tab-pane">
<h2 style="font-weight: 600;text-align: center;width: 100%;">Screenshots</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<div>
<section class="oe_container">
<div id="demo" class="row carousel slide mb32" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16" style="float: left;">
<h3 class="alert" style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px;"> <i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> Go to Project -> Project </h3>
<div style=""> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/project.png"> </div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16" style="float: left;">
<h3 class="alert" style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px;"> <i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> You can filter the project report via selecting the appropriate options from the wizard. </h3>
<div style=""> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/filter report.png"> </div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16" style="float: left;">
<h3 class="alert" style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px;"> <i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> PDF Report Of Data Import/Export Plugin Project. </h3>
<div style=""> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/PDF report.png"> </div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16" style="float: left;">
<h3 class="mb32 alert" style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; "> <i class="fa fa-check-circle-o" style="width:40px; color:#07B700"></i> Excel Report Of Data Import/Export Plugin Project. </h3>
<div style=""> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/XLS report.png"> </div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#demo" data-slide="prev" style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a class="carousel-control-next" href="#demo" data-slide="next" style="right:-25px;width: 35px;color: #000;"> <span class="carousel-control-next-icon"><i class="fa fa-chevron-right" style="font-size:24px"></i></span> </a>
</div>
</section>
</div>
</div>
</div>
<!-- faq tab-->
<div class="px-2 px-lg-4 pt-3 tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">
<ul class="list-unstyled">
</ul>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<h2 style="font-weight: 600;text-align: center;margin-bottom: 25px;width: 100%;">Suggested Products</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height: 0px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/vouchers_pos/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;"> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/coupon_pos.png"> </div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/point_of_sale_logo/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;"> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/pos_logo.png"> </div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/pos_magnify_image/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;"> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/pos_image.png"> </div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/12.0/pos_waiter/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;"> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/pos_waiter.png"> </div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/order_reprint_pos/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;"> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/pos_reprint.png"> </div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/combo_product_pos/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;"> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/pos_6.png"> </div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev" style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a class="carousel-control-next" href="#demo1" data-slide="next" style="right:-25px;width: 35px;color: #000;"> <span class="carousel-control-next-icon"><i class="fa fa-chevron-right" style="font-size:24px"></i></span> </a>
</div>
</section>
<section class="row" style="padding: 2rem 3rem 1rem;margin:0px">
<h2 style="font-weight: 600;margin-bottom: 20px;text-align: center;width: 100%;">Our Service</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<div class="row" style=" display: flex; justify-content: center; flex-wrap: wrap;width: 100%; ">
<!-- <div style="display:flex;padding-top: 20px;justify-content: space-between;"> -->
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> <a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-customization.png" style="width: 100%;border-radius: 100%;"/> </a> </div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> <a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Odoo Customization </a> </h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> <a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-erp-implementation.png" style="width: 100%;border-radius: 100%;"/> </a> </div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> <a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Odoo Implementation </a> </h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> <a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-erp-integration.png" style="width: 100%;border-radius: 100%;"/> </a> </div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> <a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Odoo Integration </a> </h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> <a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-erp-support.png" style="width: 100%;border-radius: 100%;"/> </a> </div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> <a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Odoo Support</a> </h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> <a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank"> <img src="https://www.cybrosys.com/images/hire-odoo-developer.png" style="width: 100%;border-radius: 100%;"/> </a> </div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> <a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Hire Odoo Developers</a> </h3>
</a>
</div>
<!-- </div> -->
</div>
</section>
<section class="row" style="padding: 2rem 3rem 1rem;margin:0px">
<div class="row" style="margin: 0">
<h2 style="font-weight: 600;margin-bottom: 20px;text-align: center;width: 100%;">Our Industries</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<!-- <div style="display:flex;justify-content: space-between;flex-wrap:wrap;"> -->
<div class="row" style="width: 100%">
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-1.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank" style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;"> Trading </a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;"> Easily procure and sell your products. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-2.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;" style=" margin-bottom: 10px; ">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank" style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;"> Manufacturing</a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;"> Plan, track and schedule your operations. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-3.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank" style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;"> Restaurant</a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;"> Run your bar or restaurant methodical. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-4.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank" style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;"> POS</a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;"> Easy configuring and convivial selling. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-5.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> E-commerce & Website</a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;"> Mobile friendly, awe-inspiring product pages. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-6.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Hotel Management</a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;"> An all-inclusive hotel management application. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-7.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Education</a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;"> A Collaborative platform for educational management. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div >
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> <a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-8.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> </a> </div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> <a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank" style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;"> Service Management</a> </h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;"> Keep track of services and invoice accordingly. </h3>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 0% 0% 6% 0%;">
<center>
<div class="col-md-12" style="margin: auto !important;
width: 70%;
padding: 30px;">
<h2 style="font-weight: 600;text-align: center;width: 100%;">Need Any Help?</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<h4 style="font-size:16px;"> If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support. </h4>
<div class="col-md-6" style="float:left; padding:20px;">
<h4><i class="fa fa-envelope"></i>Email us </h4>
<p>odoo@cybrosys.com / info@cybrosys.com</p>
</div>
<div class="col-md-6" style="float:left; padding:20px;">
<h4><i class="fa fa-phone"></i> Contact Us </h4>
<a href="https://www.cybrosys.com/contact/" target="_blank"> www.cybrosys.com</a>
</div>
</div>
</center>
</section>
<section class="oe_container" style="padding: 0% 0% 6% 0%;">
<div class="oe_slogan" style="margin-bottom: 0px;">
<div style=" display: flex; justify-content: center; flex-wrap: wrap; ">
</div>
<br>
<img src="https://www.cybrosys.com/images/logo.png" style="width: 190px; margin-bottom: 25px;margin-top: 30px;" class="center-block">
<div style=" display: flex; justify-content: center; flex-wrap: wrap; "> <a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px; height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
</div>
</div>
</section>
</div>

48
project_report_pdf/static/src/js/action_manager.js

@ -0,0 +1,48 @@
odoo.define('project_report_pdf.action_manager', function (require) {
"use strict";
/**
* The purpose of this file is to add the actions of type
* 'xlsx' to the ActionManager.
*/
var ActionManager = require('web.ActionManager');
var framework = require('web.framework');
var session = require('web.session');
ActionManager.include({
/**
* Executes actions of type 'ir.actions.report'.
*
* @private
* @param {Object} action the description of the action to execute
* @param {Object} options @see doAction for details
* @returns {Promise} resolved when the action has been executed
*/
_executexlsxReportDownloadAction: function (action) {
framework.blockUI();
var def = $.Deferred();
session.get_file({
url: '/xlsx_reports',
data: action.data,
success: def.resolve.bind(def),
complete: framework.unblockUI,
});
return def;
},
/**
* Overrides to handle the 'ir.actions.report' actions.
*
* @override
* @private
*/
_executeReportAction: function (action, options) {
if (action.report_type === 'xlsx') {
return this._executexlsxReportDownloadAction(action, options);
}
return this._super.apply(this, arguments);
},
});
});

10
project_report_pdf/views/action_manager.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend" name="xls_assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/project_report_pdf/static/src/js/action_manager.js"/>
</xpath>
</template>
</data>
</odoo>

12
project_report_pdf/views/project_report.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="report_project_pdf" model="ir.actions.report">
<field name="name">Project PDF Report</field>
<field name="model">project.project</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">project_report_pdf.project_report_template</field>
<field name="report_file">project_report_pdf.project_report_template</field>
</record>
</data>
</odoo>

16
project_report_pdf/views/project_report_button.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record id="project_report_pdf_inherited" model="ir.ui.view">
<field name="name">project_report_pdf_inherited.form</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='%(portal.portal_share_action)d']" position="after">
<button name="%(project_report_pdf.project_report_open_wizard)d" type="action" string="Print" class="oe_highlight"/>
</xpath>
</field>
</record>
</data>
</odoo>

22
project_report_pdf/wizard/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akshay Babu(<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import project_report_wizard

175
project_report_pdf/wizard/project_report_wizard.py

@ -0,0 +1,175 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from datetime import datetime
import json
import datetime
import pytz
import io
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
from odoo.http import request
from odoo.tools import date_utils
try:
from odoo.tools.misc import xlsxwriter
except ImportError:
import xlsxwriter
class ProjectReportButton(models.TransientModel):
_name = 'wizard.project.report'
partner_select = fields.Many2many('res.users', string='Assigned to')
stage_select = fields.Many2many('project.task.type', string="Stage")
def print_project_report_pdf(self):
active_record = self._context['active_id']
record = self.env['project.project'].browse(active_record)
data = {
'ids': self.ids,
'model': self._name,
'record': record.id,
'partner_select': self.partner_select
}
return self.env.ref('project_report_pdf.report_project_pdf').report_action(self, data=data)
def print_project_report_xls(self):
active_record = self._context['active_id']
record = self.env['project.project'].browse(active_record)
data = {
'ids': self.ids,
'model': self._name,
'record': record.id,
}
return {
'type': 'ir.actions.report',
'data': {'model': 'wizard.project.report',
'options': json.dumps(data, default=date_utils.json_default),
'output_format': 'xlsx',
'report_name': 'Project Report',
},
'report_type': 'xlsx'
}
def get_xlsx_report(self, data, response):
output = io.BytesIO()
workbook = xlsxwriter.Workbook(output, {'in_memory': True})
name = data['record']
user_obj = self.env.user
wizard_record = request.env['wizard.project.report'].search([])[-1]
task_obj = request.env['project.task']
users_selected = []
stages_selected = []
for elements in wizard_record.partner_select:
users_selected.append(elements.id)
for elements in wizard_record.stage_select:
stages_selected.append(elements.id)
if wizard_record.partner_select:
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('user_id', 'in', users_selected),
('stage_id', 'in', stages_selected)])
else:
current_task = task_obj.search([('project_id', '=', name),
('user_id', 'in', users_selected)])
else:
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('stage_id', 'in', stages_selected)])
else:
current_task = task_obj.search([('project_id', '=', name)])
vals = []
for i in current_task:
vals.append({
'name': i.name,
'user_id': i.user_id.name if i.user_id.name else '',
'stage_id': i.stage_id.name,
})
if current_task:
project_name = current_task[0].project_id.name
user = current_task[0].project_id.user_id.name
else:
project_name = current_task.project_id.name
user = current_task.project_id.user_id.name
sheet = workbook.add_worksheet("Project Report")
format1 = workbook.add_format({'font_size': 22, 'bg_color': '#D3D3D3'})
format4 = workbook.add_format({'font_size': 22})
format2 = workbook.add_format({'font_size': 12, 'bold': True, 'bg_color': '#D3D3D3'})
format3 = workbook.add_format({'font_size': 10})
format5 = workbook.add_format({'font_size': 10, 'bg_color': '#FFFFFF'})
format7 = workbook.add_format({'font_size': 10, 'bg_color': '#FFFFFF'})
format7.set_align('center')
sheet.merge_range('A1:B1', user_obj.company_id.name, format5)
sheet.merge_range('A2:B2', user_obj.company_id.street, format5)
sheet.write('A3', user_obj.company_id.city, format5)
sheet.write('B3', user_obj.company_id.zip, format5)
sheet.merge_range('A4:B4', user_obj.company_id.state_id.name, format5)
sheet.merge_range('A5:B5', user_obj.company_id.country_id.name, format5)
sheet.merge_range('C1:H5', "", format5)
sheet.merge_range(5, 0, 6, 1, "Project :", format1)
if project_name:
sheet.merge_range(5, 2, 6, 7, project_name, format1)
sheet.merge_range('A8:B8', "Project Manager :", format5)
if user:
sheet.merge_range('C8:D8', user, format5)
date_start = ''
date_end = ''
if current_task:
date_start = str(current_task[0].project_id.date_start)
if current_task:
date_end = str(current_task[0].project_id.date)
sheet.merge_range('A9:B9', "Start Date :", format5)
if not date_start:
sheet.merge_range('C9:D9', '', format5)
else:
sheet.merge_range('C9:D9', date_start, format5)
sheet.merge_range('A10:B10', "End Date :", format5)
if str(date_end):
sheet.merge_range('C10:D10', date_end, format5)
sheet.merge_range(0, 2, 4, 5, "", format5)
sheet.merge_range(1, 6, 4, 7, "", format5)
sheet.merge_range(7, 4, 9, 7, "", format5)
sheet.merge_range(10, 4, 11, 7, "", format5)
sheet.merge_range('A11:H12', 'Open Tasks', format4)
sheet.merge_range('A13:D13', "Tasks", format2)
sheet.merge_range('E13:F13', "Assigned", format2)
sheet.merge_range('G13:H13', "Stage", format2)
row_number = 13
column_number = 0
for val in vals:
sheet.merge_range(row_number, column_number, row_number, column_number + 3, val['name'], format3)
sheet.merge_range(row_number, column_number + 4, row_number, column_number + 5, val['user_id'], format3)
sheet.merge_range(row_number, column_number + 6, row_number, column_number + 7, val['stage_id'], format3)
row_number += 1
row_number += 1
sheet.merge_range(row_number, 0, row_number, 1, user_obj.company_id.phone, format7)
sheet.merge_range(row_number, 2, row_number, 4, user_obj.company_id.email, format7)
sheet.merge_range(row_number, 5, row_number, 7, user_obj.company_id.website, format7)
workbook.close()
output.seek(0)
response.stream.write(output.read())
output.close()

36
project_report_pdf/wizard/project_report_wizard_view.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="report_wizard_view_form" model="ir.ui.view">
<field name="name">report_wizard_view_form.form</field>
<field name="model">wizard.project.report</field>
<field name="arch" type="xml">
<form string="Select period">
<group>
<group >
<field name="partner_select" widget="many2many_tags"/>
</group>
<group >
<field name="stage_select" widget="many2many_tags"/>
</group>
</group>
<footer>
<button name="print_project_report_pdf" type="object" string="Print PDF" class="oe_highlight"/>
<button name="print_project_report_xls" type="object" string="Print XLS" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<act_window
id="project_report_open_wizard"
name="Project Report"
res_model="wizard.project.report"
view_mode="form"
view_id="report_wizard_view_form"
target="new"/>
</data>
</odoo>
Loading…
Cancel
Save