diff --git a/__manifest__.py b/__manifest__.py index 84970ec..d6d13c0 100755 --- a/__manifest__.py +++ b/__manifest__.py @@ -2,16 +2,19 @@ "name": "DOCX report", "summary": """Printing reports in docx format from docx templates.""", "description": """ - Adds docx reports printing from docx templates like standard Odoo reports + Adds generation reports from .docx templates like standard Odoo reports with qweb templates. Standard Odoo reports also available. - For generating pdf from docx external service the "gotenberg" is used. - It should work at the same server as Odoo app. If "gotenberg" absent, there - will be only reports in docx format. + For generating .pdf from .docx external service the "Gotenberg" is used, + and it required module for integration with this service: "gotenberg". + If integration module "gotenberg" is absent, or service itself unreachable + there will be only reports in docx format. + + This is the beta version, bugs may be present. """, "author": "RYDLAB", "website": "http://rydlab.ru", "category": "Technical", - "version": "0.0.1", + "version": "0.8.1", "depends": ["base", "web", "custom_report_field", "report_monetary_helpers"], "external_dependencies": {"python": ["docxcompose", "docxtpl"]}, "data": [ diff --git a/controllers/main.py b/controllers/main.py index 6e563b5..d4ea58a 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -1,6 +1,4 @@ from json import dumps as json_dumps, loads as json_loads -from logging import getLogger - from werkzeug.urls import url_decode from odoo.http import ( @@ -14,8 +12,6 @@ from odoo.tools.safe_eval import safe_eval, time from odoo.addons.web.controllers.main import ReportController -_logger = getLogger(__name__) - class DocxReportController(ReportController): @route() @@ -44,7 +40,6 @@ class DocxReportController(ReportController): "Content-Type", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", ), - # ("Content-Length", len(docx)), ] return request.make_response(docx, headers=docxhttpheaders) elif converter == "pdf" and "docx" in report.report_type: diff --git a/static/src/js/action_manager_report.js b/static/src/js/action_manager_report.js index c77971d..8c99cb3 100644 --- a/static/src/js/action_manager_report.js +++ b/static/src/js/action_manager_report.js @@ -39,6 +39,7 @@ odoo.define("docx_report.ReportActionManager", function (require) { } }); }, + /** * Этот метод вызывается при нажатии на пункт меню для печати отчета. * @@ -71,6 +72,7 @@ odoo.define("docx_report.ReportActionManager", function (require) { } }); }, + /** * Генерирует URL для запроса отчета */