diff options
| author | Xavier Dubuc <xdu@odoo.com> | 2020-02-13 13:15:02 +0000 |
|---|---|---|
| committer | Xavier Dubuc <xdu@odoo.com> | 2020-02-13 13:15:02 +0000 |
| commit | d2e24f54442ad3ed869b071f96b5bdbc4ce55e22 (patch) | |
| tree | 18db3b855f198eda54f5bfaed1519205ae1f0a6c /addons/web/static/src/js/core | |
| parent | c305f89e51cd5d650b28c19664b9bef3aa13ae52 (diff) | |
[IMP] js: time.js inner functions call improvement
Some functions defined in this file use another function present in the
same file through "this" keyword even if it's not needed.
This cause problems when these function are required in another file
using object destructuring.
This commit fix this issue by calling the function only by its name.
closes odoo/odoo#45299
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/core')
| -rw-r--r-- | addons/web/static/src/js/core/time.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/core/time.js b/addons/web/static/src/js/core/time.js index 8bce87e3109..3e677c4201a 100644 --- a/addons/web/static/src/js/core/time.js +++ b/addons/web/static/src/js/core/time.js @@ -283,21 +283,21 @@ var inverse_normalize_format_table = _.invert(normalize_format_table); * Get date format of the user's language */ function getLangDateFormat() { - return this.strftime_to_moment_format(_t.database.parameters.date_format); + return strftime_to_moment_format(_t.database.parameters.date_format); } /** * Get time format of the user's language */ function getLangTimeFormat() { - return this.strftime_to_moment_format(_t.database.parameters.time_format); + return strftime_to_moment_format(_t.database.parameters.time_format); } /** * Get date time format of the user's language */ function getLangDatetimeFormat() { - return this.strftime_to_moment_format(_t.database.parameters.date_format + " " + _t.database.parameters.time_format); + return strftime_to_moment_format(_t.database.parameters.date_format + " " + _t.database.parameters.time_format); } |
