forked from Techsystech/web
[FIX] 'web_easy_switch_company' flake8
parent
129777faa4
commit
5b02c32702
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue