合并企业版代码(未测试,先提交到测试分支)
This commit is contained in:
19
web_studio/controllers/ir_http.py
Normal file
19
web_studio/controllers/ir_http.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
from odoo.http import request
|
||||
|
||||
|
||||
class IrHttp(models.AbstractModel):
|
||||
_inherit = 'ir.http'
|
||||
|
||||
def session_info(self):
|
||||
result = super(IrHttp, self).session_info()
|
||||
|
||||
if result['is_system']:
|
||||
# necessary keys for Studio
|
||||
result['dbuuid'] = request.env['ir.config_parameter'].sudo().get_param('database.uuid')
|
||||
result['multi_lang'] = len(request.env['res.lang'].get_installed()) > 1
|
||||
|
||||
return result
|
||||
Reference in New Issue
Block a user