beta ready for trest
This commit is contained in:
parent
4575eb773c
commit
98556d2459
@ -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": [
|
||||
|
@ -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:
|
||||
|
@ -39,6 +39,7 @@ odoo.define("docx_report.ReportActionManager", function (require) {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Этот метод вызывается при нажатии на пункт меню для печати отчета.
|
||||
*
|
||||
@ -71,6 +72,7 @@ odoo.define("docx_report.ReportActionManager", function (require) {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Генерирует URL для запроса отчета
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user