Merge PR #635 into 14.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2022-12-08 18:17:21 +00:00
2 changed files with 6 additions and 2 deletions

View File

@@ -136,4 +136,4 @@ class Py3oParserContext(object):
no_break_space=True,
)
return self._format_date(self._env, value)
return self._format_date(value)

View File

@@ -207,8 +207,12 @@ class Py3oReport(models.TransientModel):
def _create_single_report(self, model_instance, data):
"""This function to generate our py3o report"""
self.ensure_one()
action_report = self.ir_actions_report_id
filetype = action_report.py3o_filetype
if filetype not in ("odt", "ods", "odp", "fodt", "fods", "fodp"):
filetype = "ods"
result_fd, result_path = tempfile.mkstemp(
suffix=".ods", prefix="p3o.report.tmp."
suffix="." + filetype, prefix="p3o.report.tmp."
)
tmpl_data = self.get_template(model_instance)