diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-03-08 11:21:51 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-03-08 11:21:51 +0100 |
| commit | 66e1ce8606643eb0490584356f2d7b60cfffd3e6 (patch) | |
| tree | d5260f0d5c65596fdf293b9a8e0ccb45f873e186 /addons/web/static/src/js/core.js | |
| parent | ee40bd932c4ceb92758ce73d869ab92b480acaf3 (diff) | |
[FIX] Missing date.js CultureInfo's am/pm descriptor causes wrong dates to be sent to server without user's knowledge
lp bug: https://launchpad.net/bugs/938497 fixed
bzr revid: fme@openerp.com-20120308102151-eyr71rzk345f6xji
Diffstat (limited to 'addons/web/static/src/js/core.js')
| -rw-r--r-- | addons/web/static/src/js/core.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 106d2b86dc9..49840e5aba8 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -744,6 +744,14 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp. var file_list = ["/web/static/lib/datejs/globalization/" + lang.replace("_", "-") + ".js"]; return self.rpc('/web/webclient/jslist', {mods: to_load}).pipe(function(files) { return self.do_load_js(file_list.concat(files)); + }).then(function () { + if (!Date.CultureInfo.pmDesignator) { + // If no am/pm designator is specified but the openerp + // datetime format uses %i, date.js won't be able to + // correctly format a date. See bug#938497. + Date.CultureInfo.amDesignator = 'AM'; + Date.CultureInfo.pmDesignator = 'PM'; + } }); })) } |
