summaryrefslogtreecommitdiff
path: root/addons/website/controllers/backend.py
diff options
context:
space:
mode:
authorRavi Gadhia <rga@odoo.com>2016-07-15 10:30:04 +0200
committerJérome Maes <jem@openerp.com>2016-08-04 12:02:14 +0200
commitfd09ddb6f3c40e9ec5854cc58c7eb791d4498dc0 (patch)
tree58e598da9165b3f78a9d35efcc3c9a2167b82a9b /addons/website/controllers/backend.py
parent7c20b4785bef5bf2fd84b429d42a2f3425801410 (diff)
[MIG] website: migration to new api
Migration of website module to new API. The tricky phase is ir_http.py : we need to use `request.env` only when the authenfication phase is done. Normally by calling `super` of `_dispatch` method, but website module required it to be done before. This is important since `env`is a lazy property of `request` object. Some hack were kept since this commit is a migration ('RequestUID' in ir.http, ...) Some docstrings were added.
Diffstat (limited to 'addons/website/controllers/backend.py')
-rw-r--r--addons/website/controllers/backend.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/addons/website/controllers/backend.py b/addons/website/controllers/backend.py
index 1fce35f7bba..9489938b52f 100644
--- a/addons/website/controllers/backend.py
+++ b/addons/website/controllers/backend.py
@@ -1,13 +1,8 @@
# -*- coding: utf-8 -*-
-from openerp import http
-from openerp.http import request
-from dateutil.relativedelta import relativedelta
-from datetime import datetime, date, timedelta
-from math import floor
-import time
-import operator
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT, DEFAULT_SERVER_DATE_FORMAT
+from odoo import http
+from odoo.http import request
class WebsiteBackend(http.Controller):