[IMP] web_responsive: Possibility of putting the chatter in the right (#951)

This commit is contained in:
QS5ELkMu
2018-06-22 19:57:28 +02:00
committed by Sergey Shebanin
parent e9f87d9ce4
commit e00d61569f
15 changed files with 158 additions and 11 deletions

View File

@@ -0,0 +1,5 @@
# Copyright 2018 Alexandre Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import inherited_res_users
from . import ir_http

View File

@@ -0,0 +1,13 @@
# Copyright 2018 Alexandre Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class ResUsers(models.Model):
_inherit = 'res.users'
chatter_position = fields.Selection([
('normal', 'Normal'),
('sided', 'Sided'),
], string="Chatter Position", default='normal')

View File

@@ -0,0 +1,16 @@
# Copyright 2018 Alexandre Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.http import request
class Http(models.AbstractModel):
_inherit = 'ir.http'
def session_info(self):
res = super(Http, self).session_info()
res.update({
'chatter_position': request.env.user.chatter_position or 'normal',
})
return res