Skip to content
Snippets Groups Projects
Commit a501d5624b46 authored by adrien.bonamy's avatar adrien.bonamy
Browse files

fix send_to_rednerd_server function to handle odt document

parent 9df78f7a6c1d
No related branches found
Tags 11.0.2.8.0
1 merge request!27fix send_to_rednerd_server function to handle odt document
......@@ -2,6 +2,11 @@
NEWS
====
11.0.2.8.1
==========
* Fix send_to_rednerd_server to handle ODT document.
11.0.2.8.0
==========
......
......@@ -21,7 +21,7 @@
"name": "Redner",
"summary": """
Allows to generate transactional emails and documents in PDF or HTML format""",
"version": "11.0.2.8.0",
"version": "11.0.2.8.1",
"author": "XCG Consulting",
"category": "Technical",
"depends": ["base", "mail", "converter"],
......
......@@ -108,9 +108,9 @@
# We depend on the API for consistency here
# So raised error should not result with a created template
vals["redner_id"] = self.redner.templates.account_template_add(
language,
body,
vals.get("name"),
language=language,
body=body,
name=vals.get("name"),
produces=produces,
body_format=body_format,
version=fields.Datetime.now(),
......@@ -147,9 +147,9 @@
redner_id = record.redner_id
record.redner.templates.account_template_update(
redner_id,
language,
body,
template_id=redner_id,
language=language,
body=body,
name=vals.get("name", ""),
produces=produces,
body_format=body_format,
......@@ -231,5 +231,6 @@
templates = self.redner.templates
produces, language = self.language.split("|")
body, body_format = (
(self.template_data.decode("utf8"), "base64")
......@@ -234,8 +235,8 @@
body, body_format = (
(self.template_data.decode("utf8"), "base64")
if self.language == "od+mustache"
if language == "od+mustache"
else (self.body, "text")
)
try:
templates.account_template_update(
......@@ -237,15 +238,15 @@
else (self.body, "text")
)
try:
templates.account_template_update(
self.redner_id,
language,
body,
self.name,
template_id=self.redner_id,
language=language,
body=body,
name=self.name,
produces=produces,
body_format=body_format,
version=self.write_date,
)
except ValidationError:
self.redner_id = templates.account_template_add(
......@@ -246,12 +247,12 @@
produces=produces,
body_format=body_format,
version=self.write_date,
)
except ValidationError:
self.redner_id = templates.account_template_add(
language,
body,
self.name,
language=language,
body=body,
name=self.name,
produces=produces,
body_format=body_format,
version=fields.Datetime.now(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment