add backend_theme from openworx.nl
This commit is contained in:
parent
17ecc2e4a0
commit
46d66821ec
70 changed files with 5413 additions and 0 deletions
3
backend_theme_v12/models/__init__.py
Normal file
3
backend_theme_v12/models/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import res_company
|
||||
from . import res_users
|
11
backend_theme_v12/models/res_company.py
Normal file
11
backend_theme_v12/models/res_company.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2016, 2019 Openworx
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
class ResCompany(models.Model):
|
||||
|
||||
_inherit = 'res.company'
|
||||
|
||||
dashboard_background = fields.Binary(attachment=True)
|
25
backend_theme_v12/models/res_users.py
Normal file
25
backend_theme_v12/models/res_users.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2016, 2019 Openworx
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
class ResUsers(models.Model):
|
||||
|
||||
_inherit = 'res.users'
|
||||
|
||||
sidebar_visible = fields.Boolean("Show App Sidebar", default=True)
|
||||
|
||||
def __init__(self, pool, cr):
|
||||
""" Override of __init__ to add access rights on notification_email_send
|
||||
and alias fields. Access rights are disabled by default, but allowed
|
||||
on some specific fields defined in self.SELF_{READ/WRITE}ABLE_FIELDS.
|
||||
"""
|
||||
init_res = super(ResUsers, self).__init__(pool, cr)
|
||||
# duplicate list to avoid modifying the original reference
|
||||
type(self).SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
|
||||
type(self).SELF_WRITEABLE_FIELDS.extend(['sidebar_visible'])
|
||||
# duplicate list to avoid modifying the original reference
|
||||
type(self).SELF_READABLE_FIELDS = list(self.SELF_READABLE_FIELDS)
|
||||
type(self).SELF_READABLE_FIELDS.extend(['sidebar_visible'])
|
||||
return init_res
|
Loading…
Add table
Add a link
Reference in a new issue