Browse Source

Try to make flake8 happy !

./web_easy_switch_company/controllers/main.py:26:1: E302 expected 2 blank lines, found 1
./web_easy_switch_company/controllers/main.py:32:9: F841 local variable 'context' is assigned to but never used
./web_easy_switch_company/controllers/main.py:36:1: W391 blank line at end of file
pull/18/head
Adil Houmadi 11 years ago
parent
commit
8cce6a5a2a
  1. 6
      web_easy_switch_company/controllers/main.py

6
web_easy_switch_company/controllers/main.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
#-*- encoding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Web Easy Switch Company module for OpenERP # Web Easy Switch Company module for OpenERP
@ -23,14 +23,12 @@ import openerp
import openerp.http as http import openerp.http as http
from openerp.http import request from openerp.http import request
class WebEasySwitchCompanyController(http.Controller):
class WebEasySwitchCompanyController(http.Controller):
@http.route('/web_easy_switch_company/switch/change_current_company', type='json', auth='none') @http.route('/web_easy_switch_company/switch/change_current_company', type='json', auth='none')
def change_current_company(self, company_id): def change_current_company(self, company_id):
registry = openerp.modules.registry.RegistryManager.get(request.session.db) registry = openerp.modules.registry.RegistryManager.get(request.session.db)
uid = request.session.uid uid = request.session.uid
context = request.session.context
with registry.cursor() as cr: with registry.cursor() as cr:
res = registry.get("res.users").change_current_company(cr, uid, company_id) res = registry.get("res.users").change_current_company(cr, uid, company_id)
return res return res
Loading…
Cancel
Save