Browse Source

May 6 : [UPDT] Updated 'jazzy_backend_theme'

dependabot/npm_and_yarn/odoo_website_helpdesk/static/src/cdn/minimist-1.2.8
AjmalCybro 2 years ago
parent
commit
8703391fb7
  1. 21
      jazzy_backend_theme/__init__.py
  2. 5
      jazzy_backend_theme/doc/RELEASE_NOTES.md
  3. 23
      jazzy_backend_theme/models/__init__.py
  4. 46
      jazzy_backend_theme/models/res_config_settings.py
  5. 1
      jazzy_backend_theme/static/src/components/app_menu/search_apps.js
  6. BIN
      jazzy_backend_theme/static/src/img/background.jpg
  7. 3
      jazzy_backend_theme/static/src/layout/style/layout_colors.scss

21
jazzy_backend_theme/__init__.py

@ -1 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

5
jazzy_backend_theme/doc/RELEASE_NOTES.md

@ -0,0 +1,5 @@
## Module <jazzy_backend_theme>
#### Version 16.0.1.0.0
##### ADD
##### Initial Commit for Jazzy Backend Theme

23
jazzy_backend_theme/models/__init__.py

@ -1 +1,22 @@
from . import res_config_settings
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import res_config_settings

46
jazzy_backend_theme/models/res_config_settings.py

@ -1,13 +1,37 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields
class ResCompany(models.Model):
"""Inherits the Res Company Model"""
_inherit = 'res.company'
background_image = fields.Binary(string="Background Image", attachment=True)
class ResConfigSettings(models.TransientModel):
"""Inherits the Configuration settings Model"""
_inherit = 'res.config.settings'
theme_background = fields.Binary(string="App menu Background",
@ -16,7 +40,7 @@ class ResConfigSettings(models.TransientModel):
app_bar_color = fields.Char(string='Appbar color',
config_parameter='jazzy_backend_theme.appbar_color',
default='#FFFFFF')
default='#000000')
primary_accent = fields.Char(string="Navbar color",
config_parameter='jazzy_backend_theme.primary_accent_color',
default='#004589')
@ -36,38 +60,38 @@ class ResConfigSettings(models.TransientModel):
default='#ffffff')
appbar_text = fields.Char(string="Home Menu Text Color",
config_parameter='jazzy_backend_theme.appbar_text',
default='#F7F8F7')
default='#ffffff')
secoundary_hover = fields.Char(string="AppBar Hover",
config_parameter='jazzy_backend_theme.secoundary_hover',
default='#F2F2F3')
def config_color_settings(self):
"""Define the configuration color settings"""
colors = {}
print("ppp", self.env.user.company_id.background_image)
colors['full_bg_img'] = self.env.user.company_id.background_image
colors['appbar_color'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.appbar_color');
'jazzy_backend_theme.appbar_color')
colors['primary_accent'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.primary_accent_color');
'jazzy_backend_theme.primary_accent_color')
colors['secondary_color'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.secondary_color');
'jazzy_backend_theme.secondary_color')
colors['kanban_bg_color'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.kanban_bg_color');
'jazzy_backend_theme.kanban_bg_color')
colors['primary_hover'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.primary_hover');
'jazzy_backend_theme.primary_hover')
colors['light_hover'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.light_hover');
'jazzy_backend_theme.light_hover')
colors['appbar_text'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.appbar_text');
'jazzy_backend_theme.appbar_text')
colors['secoundary_hover'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.secoundary_hover');
'jazzy_backend_theme.secoundary_hover')
return colors

1
jazzy_backend_theme/static/src/components/app_menu/search_apps.js

@ -33,7 +33,6 @@ patch(NavBar.prototype, 'jazzy_backend_theme/static/src/js/appMenu.js', {
var self = this;
rpc.query({model: 'res.config.settings',method: 'config_color_settings',args: [0],}).then(function(result){
self.colors = result;
console.log("$$$",result);
if (result.primary_accent !== false){
document.documentElement.style.setProperty("--primary-accent",result.primary_accent);
}

BIN
jazzy_backend_theme/static/src/img/background.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

3
jazzy_backend_theme/static/src/layout/style/layout_colors.scss

@ -17,8 +17,7 @@ $fullscreen-bg-color: var(--fullscreen-bg-color) !important;
--primary-accent: #004589 ;
--primary-accent-border: #ffffff;
--app-bar-accent: #ffffff;
--full-screen-bg: url(/jazzy_backend_theme/static/description/assets/background.jpg) ;
--full-screen-bg: url(/jazzy_backend_theme/static/src/img/background.jpg) ;
--kanban-bg-color:#f7f7f7;
--o-kanban-color-border-width: 8px !important;
--selected-row: #ffffff !important;

Loading…
Cancel
Save