This commit is contained in:
gsinghpal
2026-03-14 12:04:20 -04:00
parent fc3c966484
commit e9cf75ee48
75 changed files with 6991 additions and 873 deletions

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import ir_http
from . import res_users

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2024-2026 Nexa Systems Inc.
# License OPL-1
from odoo import models
from odoo.http import request
class IrHttp(models.AbstractModel):
_inherit = 'ir.http'
def session_info(self):
result = super().session_info()
if request.session.uid:
user = self.env.user
result['chatter_position'] = user.chatter_position or 'side'
result['chatter_hidden'] = user.chatter_hidden or False
return result

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Copyright 2024-2026 Nexa Systems Inc.
# License OPL-1
from odoo import fields, models
class ResUsers(models.Model):
_inherit = 'res.users'
chatter_position = fields.Selection(
selection=[
('side', 'Side (right of form)'),
('bottom', 'Bottom (below form)'),
],
string='Chatter Position',
default='side',
)
chatter_hidden = fields.Boolean(
string='Chatter Hidden',
default=False,
)
@property
def SELF_READABLE_FIELDS(self):
return super().SELF_READABLE_FIELDS + ['chatter_position', 'chatter_hidden']
@property
def SELF_WRITEABLE_FIELDS(self):
return super().SELF_WRITEABLE_FIELDS + ['chatter_position', 'chatter_hidden']