|
@ -1,5 +1,5 @@ |
|
|
#-*- encoding: utf-8 -*- |
|
|
|
|
|
############################################################################## |
|
|
|
|
|
|
|
|
# -*- encoding: utf-8 -*- |
|
|
|
|
|
# ############################################################################# |
|
|
# |
|
|
# |
|
|
# Web Easy Switch Company module for OpenERP |
|
|
# Web Easy Switch Company module for OpenERP |
|
|
# Copyright (C) 2014 GRAP (http://www.grap.coop) |
|
|
# Copyright (C) 2014 GRAP (http://www.grap.coop) |
|
@ -18,7 +18,7 @@ |
|
|
# You should have received a copy of the GNU Affero General Public License |
|
|
# You should have received a copy of the GNU Affero General Public License |
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
# |
|
|
# |
|
|
############################################################################## |
|
|
|
|
|
|
|
|
############################################################################# |
|
|
import openerp |
|
|
import openerp |
|
|
import openerp.http as http |
|
|
import openerp.http as http |
|
|
from openerp.http import request |
|
|
from openerp.http import request |
|
@ -31,4 +31,4 @@ class WebEasySwitchCompanyController(http.Controller): |
|
|
uid = request.session.uid |
|
|
uid = request.session.uid |
|
|
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 |