mirror of
https://gitlab.com/flectra-community/reporting-engine.git
synced 2024-11-24 23:22:05 +00:00
Automatic Update form OCA2FC Migrator
This commit is contained in:
parent
a9dbdc85cf
commit
efe3638ca2
@ -15,8 +15,8 @@ addon | version | summary
|
|||||||
[bi_sql_editor](bi_sql_editor/) | 2.0.1.0.0| BI Views builder, based on Materialized or Normal SQL Views
|
[bi_sql_editor](bi_sql_editor/) | 2.0.1.0.0| BI Views builder, based on Materialized or Normal SQL Views
|
||||||
[report_wkhtmltopdf_param](report_wkhtmltopdf_param/) | 2.0.1.0.0| Add new parameters for a paper format to be used by wkhtmltopdf command as arguments.
|
[report_wkhtmltopdf_param](report_wkhtmltopdf_param/) | 2.0.1.0.0| Add new parameters for a paper format to be used by wkhtmltopdf command as arguments.
|
||||||
[report_qweb_pdf_watermark](report_qweb_pdf_watermark/) | 2.0.1.0.0| Add watermarks to your QWEB PDF reports
|
[report_qweb_pdf_watermark](report_qweb_pdf_watermark/) | 2.0.1.0.0| Add watermarks to your QWEB PDF reports
|
||||||
[report_xlsx_helper](report_xlsx_helper/) | 2.0.1.0.0| Report xlsx helpers
|
[report_xlsx_helper](report_xlsx_helper/) | 2.0.1.0.1| Report xlsx helpers
|
||||||
[report_xlsx](report_xlsx/) | 2.0.1.0.3| Base module to create xlsx report
|
[report_xlsx](report_xlsx/) | 2.0.1.0.4| Base module to create xlsx report
|
||||||
[bi_view_editor](bi_view_editor/) | 2.0.1.0.0| Graphical BI views builder for Odoo
|
[bi_view_editor](bi_view_editor/) | 2.0.1.0.0| Graphical BI views builder for Odoo
|
||||||
[report_qweb_encrypt](report_qweb_encrypt/) | 2.0.1.0.0| Allow to encrypt qweb pdfs
|
[report_qweb_encrypt](report_qweb_encrypt/) | 2.0.1.0.0| Allow to encrypt qweb pdfs
|
||||||
[report_qweb_parameter](report_qweb_parameter/) | 2.0.1.0.0| Add new parameters for qweb templates in order to reduce field length and check minimal length
|
[report_qweb_parameter](report_qweb_parameter/) | 2.0.1.0.0| Add new parameters for qweb templates in order to reduce field length and check minimal length
|
||||||
|
@ -108,6 +108,7 @@ Contributors
|
|||||||
* Graeme Gellatly <gdgellatly@gmail.com>
|
* Graeme Gellatly <gdgellatly@gmail.com>
|
||||||
* Cristian Salamea <cs@prisehub.com>
|
* Cristian Salamea <cs@prisehub.com>
|
||||||
* Rod Schouteden <rod.schouteden@dynapps.be>
|
* Rod Schouteden <rod.schouteden@dynapps.be>
|
||||||
|
* Eugene Molotov <molotov@it-projects.info>
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"author": "ACSONE SA/NV," "Creu Blanca," "Odoo Community Association (OCA)",
|
"author": "ACSONE SA/NV," "Creu Blanca," "Odoo Community Association (OCA)",
|
||||||
"website": "https://gitlab.com/flectra-community/reporting-engine",
|
"website": "https://gitlab.com/flectra-community/reporting-engine",
|
||||||
"category": "Reporting",
|
"category": "Reporting",
|
||||||
"version": "2.0.1.0.3",
|
"version": "2.0.1.0.4",
|
||||||
"development_status": "Production/Stable",
|
"development_status": "Production/Stable",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"external_dependencies": {"python": ["xlsxwriter", "xlrd"]},
|
"external_dependencies": {"python": ["xlsxwriter", "xlrd"]},
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from flectra.http import content_disposition, request, route
|
from flectra.http import content_disposition, request, route, serialize_exception
|
||||||
|
from flectra.tools import html_escape
|
||||||
from flectra.tools.safe_eval import safe_eval
|
from flectra.tools.safe_eval import safe_eval
|
||||||
|
|
||||||
from flectra.addons.web.controllers import main as report
|
from flectra.addons.web.controllers import main as report
|
||||||
@ -13,6 +14,13 @@ class ReportController(report.ReportController):
|
|||||||
@route()
|
@route()
|
||||||
def report_routes(self, reportname, docids=None, converter=None, **data):
|
def report_routes(self, reportname, docids=None, converter=None, **data):
|
||||||
if converter == "xlsx":
|
if converter == "xlsx":
|
||||||
|
return self._report_routes_xlsx(reportname, docids, converter, **data)
|
||||||
|
return super(ReportController, self).report_routes(
|
||||||
|
reportname, docids, converter, **data
|
||||||
|
)
|
||||||
|
|
||||||
|
def _report_routes_xlsx(self, reportname, docids=None, converter=None, **data):
|
||||||
|
try:
|
||||||
report = request.env["ir.actions.report"]._get_report_from_name(reportname)
|
report = request.env["ir.actions.report"]._get_report_from_name(reportname)
|
||||||
context = dict(request.env.context)
|
context = dict(request.env.context)
|
||||||
if docids:
|
if docids:
|
||||||
@ -42,6 +50,7 @@ class ReportController(report.ReportController):
|
|||||||
("Content-Disposition", content_disposition(report_name + ".xlsx")),
|
("Content-Disposition", content_disposition(report_name + ".xlsx")),
|
||||||
]
|
]
|
||||||
return request.make_response(xlsx, headers=xlsxhttpheaders)
|
return request.make_response(xlsx, headers=xlsxhttpheaders)
|
||||||
return super(ReportController, self).report_routes(
|
except Exception as e:
|
||||||
reportname, docids, converter, **data
|
se = serialize_exception(e)
|
||||||
)
|
error = {"code": 200, "message": "Flectra Server Error", "data": se}
|
||||||
|
return request.make_response(html_escape(json.dumps(error)))
|
||||||
|
@ -455,6 +455,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<li>Graeme Gellatly <<a class="reference external" href="mailto:gdgellatly@gmail.com">gdgellatly@gmail.com</a>></li>
|
<li>Graeme Gellatly <<a class="reference external" href="mailto:gdgellatly@gmail.com">gdgellatly@gmail.com</a>></li>
|
||||||
<li>Cristian Salamea <<a class="reference external" href="mailto:cs@prisehub.com">cs@prisehub.com</a>></li>
|
<li>Cristian Salamea <<a class="reference external" href="mailto:cs@prisehub.com">cs@prisehub.com</a>></li>
|
||||||
<li>Rod Schouteden <<a class="reference external" href="mailto:rod.schouteden@dynapps.be">rod.schouteden@dynapps.be</a>></li>
|
<li>Rod Schouteden <<a class="reference external" href="mailto:rod.schouteden@dynapps.be">rod.schouteden@dynapps.be</a>></li>
|
||||||
|
<li>Eugene Molotov <<a class="reference external" href="mailto:molotov@it-projects.info">molotov@it-projects.info</a>></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"author": "Noviat, Odoo Community Association (OCA)",
|
"author": "Noviat, Odoo Community Association (OCA)",
|
||||||
"website": "https://gitlab.com/flectra-community/reporting-engine",
|
"website": "https://gitlab.com/flectra-community/reporting-engine",
|
||||||
"category": "Reporting",
|
"category": "Reporting",
|
||||||
"version": "2.0.1.0.0",
|
"version": "2.0.1.0.1",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"depends": ["report_xlsx"],
|
"depends": ["report_xlsx"],
|
||||||
"installable": True,
|
"installable": True,
|
||||||
|
@ -723,6 +723,7 @@ class ReportXlsxAbstract(models.AbstractModel):
|
|||||||
if isinstance(cell_format, CodeType):
|
if isinstance(cell_format, CodeType):
|
||||||
cell_format = self._eval(cell_format, render_space)
|
cell_format = self._eval(cell_format, render_space)
|
||||||
args_data.append(cell_format)
|
args_data.append(cell_format)
|
||||||
|
self._apply_formula_quirk(args_data, cell_type, cell_format)
|
||||||
if colspan > 1:
|
if colspan > 1:
|
||||||
args_pos += [row_pos, pos + colspan - 1]
|
args_pos += [row_pos, pos + colspan - 1]
|
||||||
args = args_pos + args_data
|
args = args_pos + args_data
|
||||||
@ -735,6 +736,15 @@ class ReportXlsxAbstract(models.AbstractModel):
|
|||||||
|
|
||||||
return row_pos + 1
|
return row_pos + 1
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _apply_formula_quirk(args_data, cell_type, cell_format):
|
||||||
|
""" Insert empty value to force LibreOffice to recompute the value """
|
||||||
|
if cell_type == "formula":
|
||||||
|
if not cell_format:
|
||||||
|
# Insert positional argument for missing format
|
||||||
|
args_data.append(None)
|
||||||
|
args_data.append("")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _render(code):
|
def _render(code):
|
||||||
return compile(code, "<string>", "eval")
|
return compile(code, "<string>", "eval")
|
||||||
|
Loading…
Reference in New Issue
Block a user