3
0
Fork 0

[FIX] 'web_easy_switch_company' flake8

9.0
Sylvain LE GAL 2014-10-15 00:46:07 +02:00
parent 129777faa4
commit 5b02c32702
1 changed files with 7 additions and 3 deletions

View File

@ -25,10 +25,14 @@ from openerp.http import request
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):
registry = openerp.modules.registry.RegistryManager.get(request.session.db)
registry = openerp.modules.registry.RegistryManager.get(
request.session.db)
uid = request.session.uid
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