summaryrefslogtreecommitdiff
path: root/addons/website/models/website_visitor.py
diff options
context:
space:
mode:
authorDavid Beguin <dbe@odoo.com>2019-08-19 11:31:24 +0000
committerDavid Beguin <dbe@odoo.com>2019-08-20 08:02:46 +0000
commitc5500e685aeeb2a0b6dbedc2edc7be5647bf05d7 (patch)
tree8e5c0b0eeb7462b16b0d70d07414318cedccbb9c /addons/website/models/website_visitor.py
parentb4ef0299db0e1ba5073cebd99abf6720c142671d (diff)
[FIX] tools : use babel to format timedelta
Babel is already taking the language into account while formating a time delta into a readable string like '2 minutes ago'. _format_time_ago was put in translate.py file to be able to use the _ translate class. But it can be placed in misc like other format function already using babel. This fix the PR #34624 and is linked to Task ID : 2028059 Task ID: 2055847 Closes PR #35806 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website/models/website_visitor.py')
-rw-r--r--addons/website/models/website_visitor.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/website/models/website_visitor.py b/addons/website/models/website_visitor.py
index 9e4764a80c4..9b262c26031 100644
--- a/addons/website/models/website_visitor.py
+++ b/addons/website/models/website_visitor.py
@@ -6,8 +6,7 @@ from hashlib import sha256
import hmac
from odoo import fields, models, api, _
-from odoo.tools.translate import _format_time_ago
-from odoo.tools.misc import _consteq
+from odoo.tools.misc import _consteq, _format_time_ago
from odoo.http import request