diff --git a/jazzy_backend_theme/__init__.py b/jazzy_backend_theme/__init__.py index 9a7e03ede..e37e5632d 100644 --- a/jazzy_backend_theme/__init__.py +++ b/jazzy_backend_theme/__init__.py @@ -1 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 . +# +############################################################################# from . import models \ No newline at end of file diff --git a/jazzy_backend_theme/doc/RELEASE_NOTES.md b/jazzy_backend_theme/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..c1ef73b8a --- /dev/null +++ b/jazzy_backend_theme/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module + +#### Version 16.0.1.0.0 +##### ADD +##### Initial Commit for Jazzy Backend Theme diff --git a/jazzy_backend_theme/models/__init__.py b/jazzy_backend_theme/models/__init__.py index aba222842..bc6de62ac 100644 --- a/jazzy_backend_theme/models/__init__.py +++ b/jazzy_backend_theme/models/__init__.py @@ -1 +1,22 @@ -from . import res_config_settings \ No newline at end of file +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 . +# +############################################################################# +from . import res_config_settings diff --git a/jazzy_backend_theme/models/res_config_settings.py b/jazzy_backend_theme/models/res_config_settings.py index 7f1fb7a49..94892e75b 100644 --- a/jazzy_backend_theme/models/res_config_settings.py +++ b/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() +# Author: Cybrosys Techno Solutions() +# +# 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 . +# +############################################################################# + 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 diff --git a/jazzy_backend_theme/static/src/components/app_menu/search_apps.js b/jazzy_backend_theme/static/src/components/app_menu/search_apps.js index 1f306c44f..453f6b145 100644 --- a/jazzy_backend_theme/static/src/components/app_menu/search_apps.js +++ b/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); } diff --git a/jazzy_backend_theme/static/src/img/background.jpg b/jazzy_backend_theme/static/src/img/background.jpg new file mode 100644 index 000000000..d1a36628f Binary files /dev/null and b/jazzy_backend_theme/static/src/img/background.jpg differ diff --git a/jazzy_backend_theme/static/src/layout/style/layout_colors.scss b/jazzy_backend_theme/static/src/layout/style/layout_colors.scss index 268eb2d51..c63498970 100644 --- a/jazzy_backend_theme/static/src/layout/style/layout_colors.scss +++ b/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;