[IMP]Docx Report Generation : new filter duration for float_time
This commit is contained in:
parent
0df7af86e1
commit
8c5e3dbb7d
@ -14,7 +14,7 @@
|
||||
"author": "RYDLAB, Yaltik",
|
||||
"website": "https://rydlab.ru",
|
||||
"category": "Technical",
|
||||
"version": "16.0.2.2.5",
|
||||
"version": "16.0.2.2.6",
|
||||
"license": "LGPL-3",
|
||||
"depends": ["base", "web", "custom_report_field", "report_monetary_helpers"],
|
||||
"external_dependencies": {"python": ["docxcompose", "docxtpl", "beautifulsoup4"]},
|
||||
|
@ -25,7 +25,7 @@ from odoo import _, api, fields, models
|
||||
from odoo.exceptions import AccessError, UserError
|
||||
from odoo.http import request
|
||||
from odoo.tools.safe_eval import safe_eval, time
|
||||
from odoo.tools.misc import format_date, format_datetime
|
||||
from odoo.tools.misc import format_date, format_datetime, format_duration
|
||||
|
||||
try:
|
||||
from odoo.addons.gotenberg.service.utils import (
|
||||
@ -540,6 +540,7 @@ class IrActionsReport(models.Model):
|
||||
jinja_env.filters['datetimefmt'] = lambda dt, df=False: (
|
||||
format_datetime(self.env, dt, dt_format=df)
|
||||
)
|
||||
jinja_env.filters['duration'] = lambda du: format_duration(du)
|
||||
jinja_env.filters['localesel'] = lambda record, field: (
|
||||
record._fields[field].convert_to_export(getattr(record, field), self)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user