changeset d3b479ec1e5a in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=d3b479ec1e5a
description:
Add format argument to Report.format_date
issue8444
review279611002
diffstat:
CHANGELOG | 1 +
trytond/report/report.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 30b549397664 -r d3b479ec1e5a CHANGELOG
--- a/CHANGELOG Wed Jul 17 00:55:17 2019 +0200
+++ b/CHANGELOG Wed Jul 17 00:57:39 2019 +0200
@@ -1,3 +1,4 @@
+* Add format argument to report format_date function
* Change expand attribute into a factor
* Allow SQL expression as value of fields
* Allow customizing Dict keys order with a sequence field
diff -r 30b549397664 -r d3b479ec1e5a trytond/report/report.py
--- a/trytond/report/report.py Wed Jul 17 00:55:17 2019 +0200
+++ b/trytond/report/report.py Wed Jul 17 00:57:39 2019 +0200
@@ -332,12 +332,12 @@
pass
@classmethod
- def format_date(cls, value, lang=None):
+ def format_date(cls, value, lang=None, format=None):
pool = Pool()
Lang = pool.get('ir.lang')
if lang is None:
lang = Lang.get()
- return lang.strftime(value)
+ return lang.strftime(value, format=format)
@classmethod
def format_currency(cls, value, lang, currency, symbol=True,