Browse Source

[UPD] upgrade to latest muk_web_theme 16.0

16.0
Nicolas JEUDY 2 years ago
parent
commit
79f91ab025
  1. 2
      muk_web_theme/__manifest__.py
  2. 2
      muk_web_theme/models/__init__.py
  3. 59
      muk_web_theme/models/ir_asset.py
  4. 59
      muk_web_theme/models/ir_attachment.py
  5. 10
      muk_web_theme/models/web_editor_assets.py
  6. 24
      muk_web_theme/static/src/webclient/appsbar/appsbar.scss

2
muk_web_theme/__manifest__.py

@ -43,7 +43,7 @@
{ {
'name': 'MuK Backend Theme', 'name': 'MuK Backend Theme',
'summary': 'Odoo Community Backend Theme', 'summary': 'Odoo Community Backend Theme',
'version': '16.0.1.0.2',
'version': '16.0.1.0.6',
'category': 'Themes/Backend', 'category': 'Themes/Backend',
'license': 'LGPL-3', 'license': 'LGPL-3',
'author': 'MuK IT', 'author': 'MuK IT',

2
muk_web_theme/models/__init__.py

@ -44,4 +44,6 @@ from . import res_company
from . import res_config_settings from . import res_config_settings
from . import res_users from . import res_users
from . import web_editor_assets from . import web_editor_assets
from . import ir_attachment
from . import ir_asset
from . import ir_http from . import ir_http

59
muk_web_theme/models/ir_asset.py

@ -0,0 +1,59 @@
###################################################################################
#
# Copyright (c) 2017-today MuK IT GmbH.
#
# This file is part of MuK Backend Theme
# (see https://mukit.at).
#
# MuK Proprietary License v1.0
#
# This software and associated files (the "Software") may only be used
# (executed, modified, executed after modifications) if you have
# purchased a valid license from MuK IT GmbH.
#
# The above permissions are granted for a single database per purchased
# license. Furthermore, with a valid license it is permitted to use the
# software on other databases as long as the usage is limited to a testing
# or development environment.
#
# You may develop modules based on the Software or that use the Software
# as a library (typically by depending on it, importing it and using its
# resources), but without copying any source code or material from the
# Software. You may distribute those modules under the license of your
# choice, provided that this license is compatible with the terms of the
# MuK Proprietary License (For example: LGPL, MIT, or proprietary licenses
# similar to this one).
#
# It is forbidden to publish, distribute, sublicense, or sell copies of
# the Software or modified copies of the Software.
#
# The above copyright notice and this permission notice must be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
###################################################################################
from odoo import models, fields, api
class IrAsset(models.Model):
_inherit = 'ir.asset'
# ----------------------------------------------------------
# ORM
# ----------------------------------------------------------
@api.model_create_multi
def create(self, vals_list):
if self.env.context.get('theme_variables', False):
for vals in vals_list:
vals.pop('website_id', False)
return super().create(vals_list)

59
muk_web_theme/models/ir_attachment.py

@ -0,0 +1,59 @@
###################################################################################
#
# Copyright (c) 2017-today MuK IT GmbH.
#
# This file is part of MuK Backend Theme
# (see https://mukit.at).
#
# MuK Proprietary License v1.0
#
# This software and associated files (the "Software") may only be used
# (executed, modified, executed after modifications) if you have
# purchased a valid license from MuK IT GmbH.
#
# The above permissions are granted for a single database per purchased
# license. Furthermore, with a valid license it is permitted to use the
# software on other databases as long as the usage is limited to a testing
# or development environment.
#
# You may develop modules based on the Software or that use the Software
# as a library (typically by depending on it, importing it and using its
# resources), but without copying any source code or material from the
# Software. You may distribute those modules under the license of your
# choice, provided that this license is compatible with the terms of the
# MuK Proprietary License (For example: LGPL, MIT, or proprietary licenses
# similar to this one).
#
# It is forbidden to publish, distribute, sublicense, or sell copies of
# the Software or modified copies of the Software.
#
# The above copyright notice and this permission notice must be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
###################################################################################
from odoo import models, fields, api
class IrAttachment(models.Model):
_inherit = 'ir.attachment'
# ----------------------------------------------------------
# ORM
# ----------------------------------------------------------
@api.model_create_multi
def create(self, vals_list):
if self.env.context.get('theme_variables', False):
for vals in vals_list:
vals.pop('website_id', False)
return super().create(vals_list)

10
muk_web_theme/models/web_editor_assets.py

@ -74,16 +74,6 @@ class ScssEditor(models.AbstractModel):
content = re.sub(regex, variable_content, content) content = re.sub(regex, variable_content, content)
return content return content
@api.model
def _save_asset_hook(self):
res = super()._save_asset_hook()
if (
res.get('website_id', False) and
self.env.context.get('theme_variables', False)
):
res['website_id'] = False
return res
# ---------------------------------------------------------- # ----------------------------------------------------------
# Functions # Functions
# ---------------------------------------------------------- # ----------------------------------------------------------

24
muk_web_theme/static/src/webclient/appsbar/appsbar.scss

@ -86,21 +86,12 @@
} }
} }
.o_fullscreen {
.mk_apps_sidebar_panel {
display: none;
}
.o_action_manager {
padding-left: 0;
}
}
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
.mk_sidebar_type_large { .mk_sidebar_type_large {
.mk_apps_sidebar_panel { .mk_apps_sidebar_panel {
width: $mk-sidebar-large-width; width: $mk-sidebar-large-width;
} }
.o_action_manager {
.o_navbar + .o_action_manager {
padding-left: $mk-sidebar-large-width; padding-left: $mk-sidebar-large-width;
} }
} }
@ -114,7 +105,7 @@
margin-right: 0 !important; margin-right: 0 !important;
} }
} }
.o_action_manager {
.o_navbar + .o_action_manager {
padding-left: $mk-sidebar-small-width; padding-left: $mk-sidebar-small-width;
} }
} }
@ -136,7 +127,7 @@
margin-right: 0 !important; margin-right: 0 !important;
} }
} }
.o_action_manager {
.o_navbar + .o_action_manager {
padding-left: $mk-sidebar-small-width; padding-left: $mk-sidebar-small-width;
} }
} }
@ -155,3 +146,12 @@
padding-left: 0; padding-left: 0;
} }
} }
.editor_has_snippets_hide_backend_navbar {
.mk_apps_sidebar_panel {
display: none !important;
}
.o_action_manager {
padding-left: 0 !important;
}
}
Loading…
Cancel
Save