[init/add] generic backend theme
165
muk_web_theme-19/muk_web_theme/LICENSE
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
21
muk_web_theme-19/muk_web_theme/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from . import models
|
||||
|
||||
import base64
|
||||
|
||||
from odoo.tools import file_open
|
||||
|
||||
|
||||
def _setup_module(env):
|
||||
if env.ref('base.main_company', False):
|
||||
with file_open('web/static/img/favicon.ico', 'rb') as file:
|
||||
env.ref('base.main_company').write({
|
||||
'favicon': base64.b64encode(file.read())
|
||||
})
|
||||
with file_open('muk_web_theme/static/src/img/background.png', 'rb') as file:
|
||||
env.ref('base.main_company').write({
|
||||
'background_image': base64.b64encode(file.read())
|
||||
})
|
||||
|
||||
|
||||
def _uninstall_cleanup(env):
|
||||
env['res.config.settings']._reset_theme_color_assets()
|
||||
61
muk_web_theme-19/muk_web_theme/__manifest__.py
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
'name': 'MuK Backend Theme',
|
||||
'summary': 'Odoo Community Backend Theme',
|
||||
'description': '''
|
||||
This module offers a mobile compatible design for Odoo Community.
|
||||
Furthermore it allows the user to define some design preferences.
|
||||
''',
|
||||
'version': '19.0.1.4.0',
|
||||
'category': 'Themes/Backend',
|
||||
'license': 'LGPL-3',
|
||||
'author': 'MuK IT',
|
||||
'website': 'http://www.mukit.at',
|
||||
'live_test_url': 'https://my.mukit.at/r/f6m',
|
||||
'contributors': [
|
||||
'Mathias Markl <mathias.markl@mukit.at>',
|
||||
],
|
||||
'depends': [
|
||||
'muk_web_group',
|
||||
'muk_web_chatter',
|
||||
'muk_web_dialog',
|
||||
'muk_web_appsbar',
|
||||
'muk_web_colors',
|
||||
'muk_web_refresh',
|
||||
],
|
||||
'excludes': [
|
||||
'web_enterprise',
|
||||
],
|
||||
'data': [
|
||||
'templates/web_layout.xml',
|
||||
'views/res_config_settings.xml',
|
||||
],
|
||||
'assets': {
|
||||
'web._assets_primary_variables': [
|
||||
(
|
||||
'after',
|
||||
'web/static/src/scss/primary_variables.scss',
|
||||
'muk_web_theme/static/src/scss/colors.scss'
|
||||
),
|
||||
(
|
||||
'after',
|
||||
'web/static/src/scss/primary_variables.scss',
|
||||
'muk_web_theme/static/src/scss/variables.scss'
|
||||
),
|
||||
],
|
||||
'web.assets_backend': [
|
||||
'muk_web_theme/static/src/webclient/**/*.xml',
|
||||
'muk_web_theme/static/src/webclient/**/*.scss',
|
||||
'muk_web_theme/static/src/webclient/**/*.js',
|
||||
'muk_web_theme/static/src/views/**/*.scss',
|
||||
],
|
||||
},
|
||||
'images': [
|
||||
'static/description/banner.png',
|
||||
'static/description/theme_screenshot.png'
|
||||
],
|
||||
'installable': True,
|
||||
'application': False,
|
||||
'auto_install': False,
|
||||
'post_init_hook': '_setup_module',
|
||||
'uninstall_hook': '_uninstall_cleanup',
|
||||
}
|
||||
24
muk_web_theme-19/muk_web_theme/doc/changelog.rst
Normal file
@@ -0,0 +1,24 @@
|
||||
`1.4.0`
|
||||
-------
|
||||
|
||||
- Add Refresh Module
|
||||
|
||||
`1.3.0`
|
||||
-------
|
||||
|
||||
- Add Groups Module
|
||||
|
||||
`1.2.0`
|
||||
-------
|
||||
|
||||
- Add Dialog Module
|
||||
|
||||
`1.1.0`
|
||||
-------
|
||||
|
||||
- Add Chatter Module
|
||||
|
||||
`1.0.0`
|
||||
-------
|
||||
|
||||
- Initial Release
|
||||
58
muk_web_theme-19/muk_web_theme/doc/index.rst
Normal file
@@ -0,0 +1,58 @@
|
||||
=================
|
||||
MuK Backend Theme
|
||||
=================
|
||||
|
||||
This module offers a mobile compatible design for Odoo Community. Furthermore it
|
||||
allows the user to define some design preferences. Each user can choose the size
|
||||
of the sidebar. In addition, the background image of the app menu can be set
|
||||
for each company.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
To install this module, you need to:
|
||||
|
||||
Download the module and add it to your Odoo addons folder. Afterward, log on to
|
||||
your Odoo server and go to the Apps menu. Trigger the debug mode and update the
|
||||
list by clicking on the "Update Apps List" link. Now install the module by
|
||||
clicking on the install button.
|
||||
|
||||
Upgrade
|
||||
============
|
||||
|
||||
To upgrade this module, you need to:
|
||||
|
||||
Download the module and add it to your Odoo addons folder. Restart the server
|
||||
and log on to your Odoo server. Select the Apps menu and upgrade the module by
|
||||
clicking on the upgrade button.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
To further customize the theme several settings are available in the general
|
||||
settings page.
|
||||
|
||||
Usage
|
||||
=============
|
||||
|
||||
After the module is installed, the design is adjusted accordingly.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Mathias Markl <mathias.markl@mukit.at>
|
||||
|
||||
Author & Maintainer
|
||||
-------------------
|
||||
|
||||
This module is maintained by the `MuK IT GmbH <https://www.mukit.at/>`_.
|
||||
|
||||
MuK IT is an Austrian company specialized in customizing and extending Odoo.
|
||||
We develop custom solutions for your individual needs to help you focus on
|
||||
your strength and expertise to grow your business.
|
||||
|
||||
If you want to get in touch please contact us via mail
|
||||
(sale@mukit.at) or visit our website (https://mukit.at).
|
||||
179
muk_web_theme-19/muk_web_theme/i18n/de.po
Normal file
@@ -0,0 +1,179 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * muk_web_theme
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 18.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-11-06 13:53+0000\n"
|
||||
"PO-Revision-Date: 2024-11-06 13:53+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Apps Active"
|
||||
msgstr "Aktive Apps"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_company__background_image
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_background_image
|
||||
msgid "Apps Menu Background Image"
|
||||
msgstr "Hintergrundfarbe Appsmenü"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appsmenu_text
|
||||
msgid "Apps Menu Text Color"
|
||||
msgstr "Textfarbe Appsmenü"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Apps Text"
|
||||
msgstr "Appstext"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appbar_active
|
||||
msgid "AppsBar Active Color"
|
||||
msgstr "Aktive Farbe Appsleiste"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appbar_background
|
||||
msgid "AppsBar Background Color"
|
||||
msgstr "Hintergrundfarbe Appsleiste"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appbar_text
|
||||
msgid "AppsBar Text Color"
|
||||
msgstr "Textfarbe Appsleiste"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Backend Theme"
|
||||
msgstr "Backend-Theme"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Background"
|
||||
msgstr "Hintergrund"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Background Image"
|
||||
msgstr "Hintergrundbild"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Brand"
|
||||
msgstr "Marke"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model,name:muk_web_theme.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Unternehmen"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_company__favicon
|
||||
#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_favicon
|
||||
msgid "Company Favicon"
|
||||
msgstr "Favicon Unternehmen"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model,name:muk_web_theme.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Konfigurationseinstellungen"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Context Colors"
|
||||
msgstr "Kontext Farben"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Customize context colors of the system"
|
||||
msgstr "Passen Sie die Kontextfarben des Systems an"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Customize the look and feel of the theme"
|
||||
msgstr "Passen Sie das Erscheinungsbild des Themas an"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Danger"
|
||||
msgstr "Gefahr"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Favicon"
|
||||
msgstr "Favicon"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Favicon & Logo"
|
||||
msgstr "Favicon & Logo"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model:ir.model,name:muk_web_theme.model_ir_http
|
||||
msgid "HTTP Routing"
|
||||
msgstr "HTTP-Routing"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#. odoo-javascript
|
||||
#: code:addons/muk_web_theme/static/src/webclient/navbar/navbar.xml:0
|
||||
msgid "Home Menu"
|
||||
msgstr "Home-Menü"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Info"
|
||||
msgstr "Info"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Logo"
|
||||
msgstr "Logo"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Menu Text"
|
||||
msgstr "Menü Text"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Primary"
|
||||
msgstr "Primär"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Reset Theme Colors"
|
||||
msgstr "Farben des Themas zurücksetzen"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Set the background image for the apps menu"
|
||||
msgstr "Legen Sie das Hintergrundbild für das Apps-Menü fest"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Set your own favicon and logo for the appsbar"
|
||||
msgstr "Legen Sie ihr eigenes Favicon und Logo für die Appsleiste fest"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Success"
|
||||
msgstr "Erfolg"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Theme Colors"
|
||||
msgstr "Thema Farben"
|
||||
|
||||
#. module: muk_web_theme
|
||||
#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form
|
||||
msgid "Warning"
|
||||
msgstr "Warnung"
|
||||
3
muk_web_theme-19/muk_web_theme/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from . import ir_http
|
||||
from . import res_company
|
||||
from . import res_config_settings
|
||||
19
muk_web_theme-19/muk_web_theme/models/ir_http.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class IrHttp(models.AbstractModel):
|
||||
|
||||
_inherit = "ir.http"
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Functions
|
||||
#----------------------------------------------------------
|
||||
|
||||
def session_info(self):
|
||||
result = super().session_info()
|
||||
if self.env.user._is_internal():
|
||||
for company in self.env.user.company_ids.with_context(bin_size=True):
|
||||
result['user_companies']['allowed_companies'][company.id].update({
|
||||
'has_background_image': bool(company.background_image),
|
||||
})
|
||||
return result
|
||||
20
muk_web_theme-19/muk_web_theme/models/res_company.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
|
||||
_inherit = 'res.company'
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Fields
|
||||
#----------------------------------------------------------
|
||||
|
||||
favicon = fields.Binary(
|
||||
string="Company Favicon",
|
||||
attachment=True
|
||||
)
|
||||
|
||||
background_image = fields.Binary(
|
||||
string='Apps Menu Background Image',
|
||||
attachment=True
|
||||
)
|
||||
125
muk_web_theme-19/muk_web_theme/models/res_config_settings.py
Normal file
@@ -0,0 +1,125 @@
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
@property
|
||||
def THEME_COLOR_FIELDS(self):
|
||||
return [
|
||||
'color_appsmenu_text',
|
||||
'color_appbar_text',
|
||||
'color_appbar_active',
|
||||
'color_appbar_background',
|
||||
]
|
||||
|
||||
@property
|
||||
def COLOR_ASSET_THEME_URL(self):
|
||||
return '/muk_web_theme/static/src/scss/colors.scss'
|
||||
|
||||
@property
|
||||
def COLOR_BUNDLE_THEME_NAME(self):
|
||||
return 'web._assets_primary_variables'
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Fields
|
||||
#----------------------------------------------------------
|
||||
|
||||
theme_favicon = fields.Binary(
|
||||
related='company_id.favicon',
|
||||
readonly=False
|
||||
)
|
||||
|
||||
theme_background_image = fields.Binary(
|
||||
related='company_id.background_image',
|
||||
readonly=False
|
||||
)
|
||||
|
||||
theme_color_appsmenu_text = fields.Char(
|
||||
string='Apps Menu Text Color'
|
||||
)
|
||||
|
||||
theme_color_appbar_text = fields.Char(
|
||||
string='AppsBar Text Color'
|
||||
)
|
||||
|
||||
theme_color_appbar_active = fields.Char(
|
||||
string='AppsBar Active Color'
|
||||
)
|
||||
|
||||
theme_color_appbar_background = fields.Char(
|
||||
string='AppsBar Background Color'
|
||||
)
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Helper
|
||||
#----------------------------------------------------------
|
||||
|
||||
def _get_theme_color_values(self):
|
||||
return self.env['muk_web_colors.color_assets_editor'].get_color_variables_values(
|
||||
self.COLOR_ASSET_THEME_URL,
|
||||
self.COLOR_BUNDLE_THEME_NAME,
|
||||
self.THEME_COLOR_FIELDS
|
||||
)
|
||||
|
||||
def _set_theme_color_values(self, values):
|
||||
colors = self._get_theme_color_values()
|
||||
for var, value in colors.items():
|
||||
values[f'theme_{var}'] = value
|
||||
return values
|
||||
|
||||
def _detect_theme_color_change(self):
|
||||
colors = self._get_theme_color_values()
|
||||
return any(
|
||||
self[f'theme_{var}'] != val
|
||||
for var, val in colors.items()
|
||||
)
|
||||
|
||||
def _replace_theme_color_values(self):
|
||||
variables = [
|
||||
{
|
||||
'name': field,
|
||||
'value': self[f'theme_{field}']
|
||||
}
|
||||
for field in self.THEME_COLOR_FIELDS
|
||||
]
|
||||
return self.env['muk_web_colors.color_assets_editor'].replace_color_variables_values(
|
||||
self.COLOR_ASSET_THEME_URL,
|
||||
self.COLOR_BUNDLE_THEME_NAME,
|
||||
variables
|
||||
)
|
||||
|
||||
def _reset_theme_color_assets(self):
|
||||
self.env['muk_web_colors.color_assets_editor'].reset_color_asset(
|
||||
self.COLOR_ASSET_THEME_URL,
|
||||
self.COLOR_BUNDLE_THEME_NAME,
|
||||
)
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Action
|
||||
#----------------------------------------------------------
|
||||
|
||||
def action_reset_theme_color_assets(self):
|
||||
self._reset_light_color_assets()
|
||||
self._reset_dark_color_assets()
|
||||
self._reset_theme_color_assets()
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'reload',
|
||||
}
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Functions
|
||||
#----------------------------------------------------------
|
||||
|
||||
def get_values(self):
|
||||
res = super().get_values()
|
||||
res = self._set_theme_color_values(res)
|
||||
return res
|
||||
|
||||
def set_values(self):
|
||||
res = super().set_values()
|
||||
if self._detect_theme_color_change():
|
||||
self._replace_theme_color_values()
|
||||
return res
|
||||
BIN
muk_web_theme-19/muk_web_theme/static/description/banner.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 334 KiB |
BIN
muk_web_theme-19/muk_web_theme/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 100 100" width="100pt" height="100pt"><defs><clipPath id="_clipPath_JQKfeprzGCqweYHysNwFC93s33TTLYMa"><rect width="100" height="100"/></clipPath></defs><g clip-path="url(#_clipPath_JQKfeprzGCqweYHysNwFC93s33TTLYMa)"><rect width="100" height="100" style="fill:rgb(0,0,0)" fill-opacity="0"/><g><path d=" M 73.153 24.364 C 74.115 25.121 75.195 25.725 76.364 26.15 C 77.481 26.557 78.643 26.788 79.811 26.841 C 79.345 31.478 78.276 37.25 76.809 43.024 L 63.516 43.024 C 67.067 34.977 70.347 28.628 73.153 24.364 Z " fill="rgb(247,134,19)"/><g><rect x="44.544" y="-0.228" width="13.952" height="43.252" transform="matrix(1,0,0,1,0,0)" fill="rgb(0,160,121)"/><path d=" M 44.544 -0.228 L 58.496 -0.228 L 58.496 5.121 L 53.846 5.121 C 52.562 5.121 51.52 6.162 51.52 7.446 C 51.52 8.73 52.562 9.771 53.846 9.771 L 58.496 9.771 L 58.496 14.422 L 53.846 14.422 C 52.562 14.422 51.52 15.463 51.52 16.747 C 51.52 18.032 52.562 19.073 53.846 19.073 L 58.496 19.073 L 58.496 23.723 L 53.846 23.723 C 52.562 23.723 51.52 24.764 51.52 26.049 C 51.52 27.333 52.562 28.374 53.846 28.374 L 58.496 28.374 L 58.496 33.025 L 53.846 33.025 C 52.562 33.025 51.52 34.066 51.52 35.35 C 51.52 36.635 52.562 37.676 53.846 37.676 L 58.496 37.676 L 58.496 43.024 L 44.544 43.024 L 44.544 -0.228 Z " fill="rgb(0,206,179)"/></g><path d=" M 17.747 7.168 L 28.646 19.92 C 27.183 22.113 25.114 23.728 22.681 24.547 C 20.258 25.364 17.71 25.31 15.348 24.419 L 17.747 7.168 Z " fill="rgb(46,188,250)"/><path d=" M 15.288 23.257 C 16.318 23.473 17.367 23.583 18.422 23.583 C 19.766 23.583 21.12 23.406 22.453 23.049 C 24.834 22.412 26.979 21.241 28.763 19.643 L 31.201 28.742 L 34.872 43.024 L 20.423 43.024 L 17.737 32.397 C 17.734 32.386 17.731 32.375 17.728 32.365 L 15.288 23.257 Z " fill="rgb(8,139,245)"/><g><path d=" M 79.61 93.252 C 79.61 97.098 76.481 100.228 72.634 100.228 L 26.127 100.228 C 22.28 100.228 19.151 97.098 19.151 93.252 L 19.151 47.675 L 79.61 47.675 L 79.61 93.252 Z " fill="rgb(152,81,132)"/><path d=" M 84.261 45.349 C 84.261 45.97 84.019 46.554 83.579 46.993 C 83.14 47.433 82.556 47.675 81.935 47.675 L 16.825 47.675 C 15.543 47.675 14.5 46.631 14.5 45.349 C 14.5 44.729 14.742 44.145 15.182 43.706 C 15.621 43.266 16.205 43.024 16.825 43.024 L 37.843 43.024 C 37.848 43.024 37.852 43.024 37.857 43.024 C 37.86 43.024 37.863 43.024 37.866 43.024 L 61.636 43.024 C 61.64 43.024 61.644 43.024 61.648 43.024 C 61.65 43.024 61.653 43.024 61.656 43.024 L 80.275 43.024 C 80.278 43.024 80.281 43.024 80.284 43.024 C 80.288 43.024 80.293 43.024 80.297 43.024 L 81.936 43.024 C 83.217 43.024 84.261 44.067 84.261 45.349 Z " fill="rgb(113,34,88)"/><g><path d=" M 26.127 61.627 C 24.843 61.627 23.801 62.668 23.801 63.952 L 23.801 93.252 C 23.801 94.536 24.843 95.577 26.127 95.577 C 27.411 95.577 28.452 94.536 28.452 93.252 L 28.452 63.952 C 28.452 62.668 27.411 61.627 26.127 61.627 Z " fill="rgb(113,34,88)"/><path d=" M 26.127 52.325 C 24.843 52.325 23.801 53.367 23.801 54.651 C 23.801 55.934 24.843 56.976 26.127 56.976 C 27.41 56.976 28.452 55.934 28.452 54.651 C 28.452 53.367 27.41 52.325 26.127 52.325 Z " fill="rgb(113,34,88)"/></g></g><path d=" M 85.197 22.249 C 84.376 24.502 82.486 26.157 80.134 26.676 C 78.848 26.963 77.506 26.874 76.255 26.419 C 74.959 25.947 73.843 25.112 73.028 24.006 C 73.028 24.005 73.028 24.005 73.027 24.004 C 71.637 22.118 71.285 19.678 72.084 17.478 C 72.956 15.085 78.628 9.982 83.565 6.1 C 84.923 12.271 86.067 19.86 85.197 22.249 Z " fill="rgb(251,185,69)"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
223
muk_web_theme-19/muk_web_theme/static/description/index.html
Normal file
@@ -0,0 +1,223 @@
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h2 class="oe_slogan">MuK Backend Theme</h2>
|
||||
<h3 class="oe_slogan mb-0">Odoo Community Backend Theme</h3>
|
||||
<img src="logo.png" style="width: 150px;" class="mx-auto center-block">
|
||||
<h4 class="oe_slogan mt-0" style="font-size: 23px">MuK IT GmbH - www.mukit.at</h4>
|
||||
<div class="mb-4" style="text-align: center;">
|
||||
<span
|
||||
class="btn btn-sm mb-2"
|
||||
style="font-size:14px; font-weight:500; background-color:#243742; color:#fff; cursor:default;"
|
||||
>
|
||||
<i class="fa fa-check"></i> Community
|
||||
</span>
|
||||
<span
|
||||
class="btn btn-sm mb-2"
|
||||
style="font-size:14px; font-weight:500; background-color:#5D8DA8; color:#fff; cursor:default;"
|
||||
>
|
||||
<i class="fa fa-times me-1"></i> Enterprise
|
||||
</span>
|
||||
</div>
|
||||
<div class="oe_demo oe_screenshot"
|
||||
style="max-width: 84%; margin: 16px 8%">
|
||||
<img src="screenshot.png">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="text-justify" style="max-width: 84%; margin: 16px 8%;">
|
||||
<h3 class="oe_slogan">Overview</h3>
|
||||
<p class="oe_mt32">
|
||||
This module offers a mobile compatible design for Odoo Community. Furthermore it
|
||||
allows the user to define some design preferences. Each user can choose the size
|
||||
of the sidebar. In addition, the background image of the app menu can be set
|
||||
for each company.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="text-justify" style="max-width: 84%; margin: 16px 8%;">
|
||||
<h3 class="oe_slogan">Desktop Interface</h3>
|
||||
<p>
|
||||
The theme adds a new apps menu. This can also be opened via the menu icon. Instead
|
||||
of a list, the apps are now displayed in a fullscreen popover. If you start tapping
|
||||
while you are on the menu, the menu search opens automatically.
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="mb16 col-lg-6">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_apps.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb16 col-lg-6">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_chatter.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="text-justify" style="max-width: 84%; margin: 16px 8%;">
|
||||
<h3 class="oe_slogan">Mobile Interface</h3>
|
||||
<p>
|
||||
The mobile view has also been improved. Here too, the menu view is now a list with
|
||||
corresponding icons and the chat buttons are smaller in the mobile view to optimise
|
||||
the use of space.
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="mb16 col-md-4 col-lg-3">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_mobile_apps.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb16 col-md-4 col-lg-3">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_mobile_form.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb16 col-md-4 col-lg-3">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_mobile_menu.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb16 col-md-4 col-lg-3">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_mobile_kanban.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="text-justify" style="max-width: 84%; margin: 16px 8%;">
|
||||
<h3 class="oe_slogan">Fully Customizable</h3>
|
||||
<p>
|
||||
In addition to the colours, the favicon and the appsbar logo can also be set in
|
||||
the general settings. Each user also has the option of adjusting the relevant
|
||||
settings in their user profile.
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="mb16 col-lg-6">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_customize.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb16 col-lg-6">
|
||||
<div class="oe_demo oe_screenshot">
|
||||
<img src="screenshot_settings.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section
|
||||
class="oe_container oe_dark d-flex justify-content-around align-items-lg-center flex-column flex-lg-row">
|
||||
<div class="d-flex flex-column m-3 ms-lg-4">
|
||||
<h3 class="oe_slogan mb-3 mt-3 text-left">
|
||||
<i class="fa fa-comments mr8"></i>Want more?
|
||||
</h3>
|
||||
<p>
|
||||
Are you having troubles with your Odoo integration? Or do you feel
|
||||
your system lacks of essential features? <br>If your answer is <b>YES</b>
|
||||
to one of the above questions, feel free to contact us at anytime
|
||||
with your inquiry. <br>We are looking forward to discuss your
|
||||
needs and plan the next steps with you. <br>
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="oe_slogan d-flex flex-column ms-1 me-1 ms-lg-4 me-lg-4 flex-grow-1">
|
||||
<a class="btn btn-primary btn-lg m-3"
|
||||
href="mailto:sale@mukit.at?subject=Request%20Quote"
|
||||
style="font-size: 1.2rem; position: relative; overflow: hidden;">
|
||||
<i class="fa fa-envelope me-1"></i>REQUEST QUOTE
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h3 class="oe_slogan">Our Services</h3>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<div>
|
||||
<div style="width: 75px; height: 75px; border-radius: 100%; margin: auto">
|
||||
<img src="/service_development.png" style="width: 100%; border-radius: 100%">
|
||||
</div>
|
||||
<h3
|
||||
class="oe_slogan"
|
||||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 5px; color: #000 !important; opacity: 1 !important; line-height: 17px"
|
||||
>
|
||||
Odoo <br>Development
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div style="width: 75px; height: 75px; border-radius: 100%; margin: auto">
|
||||
<img src="/service_integration.png" style="width: 100%; border-radius: 100%">
|
||||
</div>
|
||||
<h3
|
||||
class="oe_slogan"
|
||||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 5px; color: #000 !important; opacity: 1 !important; line-height: 17px"
|
||||
>
|
||||
Odoo <br>Integration
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div style="width: 75px; height: 75px; border-radius: 100%; margin: auto">
|
||||
<img src="/service_infrastructure.png" style="width: 100%; border-radius: 100%">
|
||||
</div>
|
||||
<h3
|
||||
class="oe_slogan"
|
||||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 5px; color: #000 !important; opacity: 1 !important; line-height: 17px"
|
||||
>
|
||||
Odoo <br>Infrastructure
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div style="width: 75px; height: 75px; border-radius: 100%; margin: auto">
|
||||
<img src="/service_training.png" style="width: 100%; border-radius: 100%">
|
||||
</div>
|
||||
<h3
|
||||
class="oe_slogan"
|
||||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 5px; color: #000 !important; opacity: 1 !important; line-height: 17px"
|
||||
>
|
||||
Odoo <br>Training
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div style="width: 75px; height: 75px; border-radius: 100%; margin: auto">
|
||||
<img src="/service_support.png" style="width: 100%; border-radius: 100%">
|
||||
</div>
|
||||
<h3
|
||||
class="oe_slogan"
|
||||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 5px; color: #000 !important; opacity: 1 !important; line-height: 17px"
|
||||
>
|
||||
Odoo <br>Support
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
BIN
muk_web_theme-19/muk_web_theme/static/description/logo.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
muk_web_theme-19/muk_web_theme/static/description/screenshot.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 692 KiB |
|
After Width: | Height: | Size: 378 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 448 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 168 KiB |
BIN
muk_web_theme-19/muk_web_theme/static/src/img/background.png
Normal file
|
After Width: | Height: | Size: 494 KiB |
13
muk_web_theme-19/muk_web_theme/static/src/scss/colors.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
// Colors
|
||||
|
||||
$mk_color_appsmenu_text: #F8F9FA;
|
||||
$mk_color_appbar_text: #DEE2E6;
|
||||
$mk_color_appbar_active: #5D8DA8;
|
||||
$mk_color_appbar_background: #111827;
|
||||
|
||||
// Override
|
||||
|
||||
$mk-appsmenu-color: $mk_color_appsmenu_text;
|
||||
$mk-appbar-color: $mk_color_appbar_text;
|
||||
$mk-appbar-active: $mk_color_appbar_active;
|
||||
$mk-appbar-background: $mk_color_appbar_background;
|
||||
@@ -0,0 +1 @@
|
||||
$o-navbar-badge-bg: $o-brand-primary;
|
||||
@@ -0,0 +1,8 @@
|
||||
.o_form_view {
|
||||
&:not(.o_field_highlight) .o_field_widget:not(.o_field_invalid):not(.o_field_highlight) .o_input:not(:hover):not(:focus) {
|
||||
--o-input-border-color: #{$gray-200};
|
||||
}
|
||||
&:not(.o_field_highlight) .o_required_modifier.o_field_widget:not(.o_field_invalid):not(.o_field_highlight) .o_input:not(:hover):not(:focus) {
|
||||
--o-input-border-color: #{$gray-400};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { useEffect } from "@odoo/owl";
|
||||
import { user } from "@web/core/user";
|
||||
import { url } from "@web/core/utils/urls";
|
||||
import { useBus, useService } from "@web/core/utils/hooks";
|
||||
|
||||
import { Dropdown } from "@web/core/dropdown/dropdown";
|
||||
|
||||
export class AppsMenu extends Dropdown {
|
||||
setup() {
|
||||
super.setup();
|
||||
this.commandPaletteOpen = false;
|
||||
this.commandService = useService("command");
|
||||
if (user.activeCompany.has_background_image) {
|
||||
this.imageUrl = url('/web/image', {
|
||||
model: 'res.company',
|
||||
field: 'background_image',
|
||||
id: user.activeCompany.id,
|
||||
});
|
||||
} else {
|
||||
this.imageUrl = '/muk_web_theme/static/src/img/background.png';
|
||||
}
|
||||
useEffect(
|
||||
(isOpen) => {
|
||||
if (isOpen) {
|
||||
const openMainPalette = (ev) => {
|
||||
if (
|
||||
!this.commandServiceOpen &&
|
||||
ev.key.length === 1 &&
|
||||
!ev.ctrlKey &&
|
||||
!ev.altKey
|
||||
) {
|
||||
this.commandService.openMainPalette(
|
||||
{ searchValue: `/${ev.key}` },
|
||||
() => { this.commandPaletteOpen = false; }
|
||||
);
|
||||
this.commandPaletteOpen = true;
|
||||
}
|
||||
}
|
||||
window.addEventListener("keydown", openMainPalette);
|
||||
return () => {
|
||||
window.removeEventListener("keydown", openMainPalette);
|
||||
this.commandPaletteOpen = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
() => [this.state.isOpen]
|
||||
);
|
||||
useBus(this.env.bus, "ACTION_MANAGER:UI-UPDATED", () => {
|
||||
if (this.state.close) {
|
||||
this.state.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
onOpened() {
|
||||
super.onOpened();
|
||||
if (this.menuRef && this.menuRef.el) {
|
||||
this.menuRef.el.style.backgroundImage = `url('${this.imageUrl}')`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
.o_navbar_apps_menu .dropdown-toggle {
|
||||
padding: 0px 14px !important;
|
||||
}
|
||||
|
||||
.mk_app_menu.dropdown-menu {
|
||||
display: flex !important;
|
||||
flex-direction: row !important;
|
||||
flex-wrap: wrap !important;
|
||||
align-content: flex-start;
|
||||
right: 0 !important;
|
||||
left: 0 !important;
|
||||
bottom: 0 !important;
|
||||
max-height: 100vh;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
user-select: none;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
background: {
|
||||
size: cover;
|
||||
repeat: no-repeat;
|
||||
position: center;
|
||||
}
|
||||
@include media-breakpoint-up(lg) {
|
||||
padding: {
|
||||
left: 20vw;
|
||||
right: 20vw;
|
||||
}
|
||||
}
|
||||
.o_app {
|
||||
margin-top: 20px;
|
||||
width: percentage(1/3);
|
||||
background: none !important;
|
||||
@include media-breakpoint-up(sm) {
|
||||
width: percentage(1/4);
|
||||
}
|
||||
@include media-breakpoint-up(md) {
|
||||
width: percentage(1/6);
|
||||
}
|
||||
> a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.mk_app_icon {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
max-width: 70px;
|
||||
border-radius: 0.375rem;
|
||||
background-color: $white;
|
||||
transform-origin: center bottom;
|
||||
transition: box-shadow ease-in 0.1s, transform ease-in 0.1s;
|
||||
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 4px 4px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
.mk_app_name {
|
||||
color: $mk-appsmenu-color;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
.mk_app_icon {
|
||||
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 8px 8px rgba(0, 0, 0, 0.03);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { patch } from '@web/core/utils/patch';
|
||||
import { useService } from '@web/core/utils/hooks';
|
||||
|
||||
import { NavBar } from '@web/webclient/navbar/navbar';
|
||||
import { AppsMenu } from "@muk_web_theme/webclient/appsmenu/appsmenu";
|
||||
|
||||
patch(NavBar.prototype, {
|
||||
setup() {
|
||||
super.setup();
|
||||
this.appMenuService = useService('app_menu');
|
||||
},
|
||||
});
|
||||
|
||||
patch(NavBar, {
|
||||
components: {
|
||||
...NavBar.components,
|
||||
AppsMenu,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
.o_main_navbar {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t
|
||||
t-name="muk_web_theme.NavBar.AppsMenu"
|
||||
t-inherit="web.NavBar.AppsMenu"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<xpath expr="//Dropdown" position="replace">
|
||||
<AppsMenu menuClass="'mk_app_menu'">
|
||||
<button data-hotkey="h" title="Home Menu">
|
||||
<i class="oi oi-apps" />
|
||||
</button>
|
||||
<t t-set-slot="content">
|
||||
<DropdownItem
|
||||
t-foreach="this.appMenuService.getAppsMenuItems()"
|
||||
t-as="app"
|
||||
t-key="app.id"
|
||||
class="'o_app'"
|
||||
attrs="{ href: app.href, 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
||||
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
||||
closingMode="'none'"
|
||||
>
|
||||
<a
|
||||
t-att-href="app.href"
|
||||
t-on-click.prevent=""
|
||||
>
|
||||
<img
|
||||
t-if="app.webIconData"
|
||||
class="mk_app_icon"
|
||||
t-att-src="app.webIconData"
|
||||
/>
|
||||
<img
|
||||
t-else=""
|
||||
class="mk_app_icon"
|
||||
src="/base/static/description/icon.png"
|
||||
/>
|
||||
<span class="mk_app_name">
|
||||
<t t-out="app.label"/>
|
||||
</span>
|
||||
</a>
|
||||
</DropdownItem>
|
||||
</t>
|
||||
</AppsMenu>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
13
muk_web_theme-19/muk_web_theme/templates/web_layout.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="layout" inherit_id="web.layout">
|
||||
<xpath expr="//link[@rel='shortcut icon']" position="before">
|
||||
<t
|
||||
t-set="x_icon"
|
||||
t-value="x_icon or '/web/image/res.company/%s/favicon' % request.env.company.id"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
102
muk_web_theme-19/muk_web_theme/views/res_config_settings.xml
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="view_res_config_settings_appsbar_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.form</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="muk_web_appsbar.view_res_config_settings_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='appbar_image']/../.." position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_res_config_settings_colors_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.form</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="muk_web_colors.view_res_config_settings_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//block[@id='branding_settings']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//block[@id='branding_settings']" position="after">
|
||||
<block title="Backend Theme" id="theme_settings">
|
||||
<setting string="Theme Colors" help="Customize the look and feel of the theme">
|
||||
<div class="w-50 row">
|
||||
<label for="color_brand_light" string="Brand" class="d-block w-75 py-2"/>
|
||||
<field name="color_brand_light" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="color_primary_light" string="Primary" class="d-block w-75 py-2"/>
|
||||
<field name="color_primary_light" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="theme_color_appsmenu_text" string="Menu Text" class="d-block w-75 py-2"/>
|
||||
<field name="theme_color_appsmenu_text" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="theme_color_appbar_text" string="Apps Text" class="d-block w-75 py-2"/>
|
||||
<field name="theme_color_appbar_text" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="theme_color_appbar_active" string="Apps Active" class="d-block w-75 py-2"/>
|
||||
<field name="theme_color_appbar_active" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="theme_color_appbar_background" string="Background" class="d-block w-75 py-2"/>
|
||||
<field name="theme_color_appbar_background" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
</setting>
|
||||
<setting string="Context Colors" help="Customize context colors of the system">
|
||||
<div class="w-50 row">
|
||||
<label for="color_info_light" string="Info" class="d-block w-75 py-2"/>
|
||||
<field name="color_info_light" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="color_success_light" string="Success" class="d-block w-75 py-2"/>
|
||||
<field name="color_success_light" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="color_warning_light" string="Warning" class="d-block w-75 py-2"/>
|
||||
<field name="color_warning_light" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<div class="w-50 row">
|
||||
<label for="color_danger_light" string="Danger" class="d-block w-75 py-2"/>
|
||||
<field name="color_danger_light" class="d-block w-25 p-0 m-0" widget="color"/>
|
||||
</div>
|
||||
<button
|
||||
name="action_reset_theme_color_assets"
|
||||
icon="fa-refresh"
|
||||
type="object"
|
||||
string="Reset Theme Colors"
|
||||
class="btn-link"
|
||||
/>
|
||||
</setting>
|
||||
<setting
|
||||
string="Background Image"
|
||||
company_dependent="1"
|
||||
help="Set the background image for the apps menu"
|
||||
>
|
||||
<field name="theme_background_image" widget="image" class="ml-4 w-75"/>
|
||||
</setting>
|
||||
<setting
|
||||
string="Favicon & Logo"
|
||||
company_dependent="1"
|
||||
help="Set your own favicon and logo for the appsbar"
|
||||
>
|
||||
<div class="w-50 row">
|
||||
<label for="appbar_image" string="Logo" class="o_light_label mb-1"/>
|
||||
<field name="appbar_image" widget="image" class="ml-4 oe_avatar"/>
|
||||
<div class="w-100 mt-1"/>
|
||||
<label for="theme_favicon" string="Favicon" class="o_light_label mb-1"/>
|
||||
<field name="theme_favicon" widget="image" class="ml-4 oe_avatar"/>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||