[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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user