mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
Merge pull request #47 from legalsylvain/8.0_fix_flake8
[8.0] fix flake8
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[](https://travis-ci.org/OCA/web)
|
||||
[](https://coveralls.io/r/OCA/web?branch=master)
|
||||
[](https://travis-ci.org/OCA/web)
|
||||
[](https://coveralls.io/r/OCA/web?branch=8.0)
|
||||
|
||||
Web addons for Odoo
|
||||
===================
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
|
||||
# Copyright (C) 2012-2013 Agile Business Group sagl (<http://www.agilebg.com>)
|
||||
# Copyright (C) 2012-2013:
|
||||
# Agile Business Group sagl (<http://www.agilebg.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published
|
||||
|
||||
Reference in New Issue
Block a user