From ab7b1ab5a4dd27f28ef5a10c8f8e55957b47f55b Mon Sep 17 00:00:00 2001 From: Vildan Safin Date: Fri, 28 Aug 2020 16:50:27 +0500 Subject: [PATCH] :zap: theme_kit: Compatibility with backend_theme Signed-off-by: Vildan Safin --- theme_kit/__init__.py | 2 +- theme_kit/__manifest__.py | 37 +- theme_kit/data/theme_data.xml | 489 +++++----- theme_kit/doc/changelog.rst | 11 + theme_kit/i18n/es_CR.po | 12 +- theme_kit/i18n/fr.po | 179 ++-- theme_kit/i18n/ru.po | 180 ++-- theme_kit/i18n/sl.po | 15 +- theme_kit/models/__init__.py | 2 +- .../__pycache__/__init__.cpython-36.pyc | Bin 0 -> 211 bytes .../__pycache__/res_config.cpython-36.pyc | Bin 0 -> 3264 bytes .../models/__pycache__/theme.cpython-36.pyc | Bin 0 -> 35864 bytes theme_kit/models/res_config.py | 95 +- theme_kit/models/theme.py | 498 ++++------- theme_kit/views/ir_attachment.xml | 32 +- theme_kit/views/res_config.xml | 313 +++---- theme_kit/views/templates.xml | 24 +- theme_kit/views/theme.xml | 838 ++++++------------ 18 files changed, 1073 insertions(+), 1654 deletions(-) create mode 100644 theme_kit/models/__pycache__/__init__.cpython-36.pyc create mode 100644 theme_kit/models/__pycache__/res_config.cpython-36.pyc create mode 100644 theme_kit/models/__pycache__/theme.cpython-36.pyc diff --git a/theme_kit/__init__.py b/theme_kit/__init__.py index 3ed6cbbe89..92325983cf 100644 --- a/theme_kit/__init__.py +++ b/theme_kit/__init__.py @@ -1,2 +1,2 @@ -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import models diff --git a/theme_kit/__manifest__.py b/theme_kit/__manifest__.py index 70353abaea..51162495d4 100644 --- a/theme_kit/__manifest__.py +++ b/theme_kit/__manifest__.py @@ -1,20 +1,26 @@ # Copyright 2016 Ivan Yelizariev # Copyright 2018 Dinar Gabbasov -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). { "name": """Brand kit""", "summary": """Brand your odoo instance in few clicks""", "category": "Debranding", - # "live_test_url": "http://apps.it-projects.info/shop/product/theme-kit?version=11.0", - "images": ["images/brandkit.png"], + "live_test_url": "http://apps.it-projects.info/shop/product/theme-kit?version=11.0", + "images": ['images/brandkit.png'], "version": "11.0.1.1.2", "application": False, + "author": "IT-Projects LLC, Ivan Yelizariev", "website": "https://it-projects.info", - "license": "Other OSI approved licence", # MIT + "license": "GPL-3", "price": 50.00, "currency": "EUR", - "depends": ["web_debranding", "web_login_background", "web_widget_color"], + + "depends": [ + "web_debranding", + "web_login_background", + "web_widget_color", + ], "external_dependencies": {"python": [], "bin": []}, "data": [ "security/ir.model.access.csv", @@ -24,17 +30,28 @@ "views/theme.xml", "data/theme_data.xml", ], - "qweb": [], - "demo": [], + "qweb": [ + ], + "demo": [ + ], + "post_load": None, "pre_init_hook": None, "post_init_hook": None, + "auto_install": False, "installable": True, + "demo_title": "Brand kit", - "demo_addons": ["web_debranding", "web_login_background"], - "demo_addons_hidden": [], + "demo_addons": [ + "web_debranding", + "web_login_background", + ], + "demo_addons_hidden": [ + ], "demo_url": "theme-kit", "demo_summary": "Brand your odoo instance in few clicks.", - "demo_images": ["images/brandkit.png"], + "demo_images": [ + "images/brandkit.png", + ] } diff --git a/theme_kit/data/theme_data.xml b/theme_kit/data/theme_data.xml index 8126bc51d1..0a8e2bb05a 100644 --- a/theme_kit/data/theme_data.xml +++ b/theme_kit/data/theme_data.xml @@ -1,241 +1,254 @@ - + + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> - - - Burger King - #ED7902 - True - #994E01 - True - #FFFFFF - True - #762823 - True - #FDBD10 - True - #762823 - True - #FDBD10 - True - - - Burger King - #ED7902 - True - #59291C - True - #FFFFFF - True - #762823 - True - #FDBD10 - True - #762823 - True - #FDBD10 - True - - - Burger King - #FDDE63 - True - #EC1C24 - True - #EC1C24 - True - #EC1C24 - True - #FDDE63 - True - #000000 - True - - - Burger King - - - - - - - You Tube - #FFFFFF - True - #EBEBEB - True - #444444 - True - #FFFFFF - True - #CD201F - True - #FFFFFF - True - #444444 - True - - - You Tube - #FFFFFF - True - #CD201F - True - #444444 - True - #FFFFFF - True - #CD201F - True - #FFFFFF - True - #444444 - True - - - You Tube - #F1F1F1 - True - #CD201F - True - #CD201F - True - #CD201F - True - #444444 - True - #444444 - True - #CD201F - True - #FFFFFF - True - - - You Tube - - - - - - - Coca-Cola - #ED1C16 - True - #000000 - True - #FFFFFF - True - #FFFFFF - True - #000000 - True - #FFFFFF - True - #000000 - True - - - Coca-Cola - #ED1C16 - True - #FFFFFF - True - #FFFFFF - True - #FFFFFF - True - #000000 - True - #FFFFFF - True - #000000 - True - - - Coca-Cola - #FFFFFF - True - #ED1C16 - True - #ED1C16 - True - #ED1C16 - True - #000000 - True - #000000 - True - #000000 - True - #FFFFFF - True - - - Coca-Cola - - - - - - - IKEA - #003399 - True - #002369 - True - #FFCC00 - True - #003399 - True - #FFCC00 - True - #003399 - True - #FFCC00 - True - - - IKEA - #003399 - True - #FFCC00 - True - #FFCC00 - True - #003399 - True - #FFCC00 - True - #003399 - True - #FFCC00 - True - - - IKEA - #FFCC00 - True - #003399 - True - #003399 - True - #003399 - True - #003399 - True - #003399 - True - #FFCC00 - True - #000000 - True - - - IKEA - - - - + + + Burger King + #ED7902 + True + #994E01 + True + #FFFFFF + True + #762823 + True + #FDBD10 + True + #762823 + True + #FDBD10 + True + + + + Burger King + #ED7902 + True + #59291C + True + #FFFFFF + True + #762823 + True + #FDBD10 + True + #762823 + True + #FDBD10 + True + + + + Burger King + #FDDE63 + True + #EC1C24 + True + #EC1C24 + True + #EC1C24 + True + #FDDE63 + True + #000000 + True + + + + Burger King + + + + + + + You Tube + #FFFFFF + True + #EBEBEB + True + #444444 + True + #FFFFFF + True + #CD201F + True + #FFFFFF + True + #444444 + True + + + + You Tube + #FFFFFF + True + #CD201F + True + #444444 + True + #FFFFFF + True + #CD201F + True + #FFFFFF + True + #444444 + True + + + + You Tube + #F1F1F1 + True + #CD201F + True + #CD201F + True + #CD201F + True + #444444 + True + #444444 + True + #CD201F + True + #FFFFFF + True + + + + You Tube + + + + + + + Coca-Cola + #ED1C16 + True + #000000 + True + #FFFFFF + True + #FFFFFF + True + #000000 + True + #FFFFFF + True + #000000 + True + + + + Coca-Cola + #ED1C16 + True + #FFFFFF + True + #FFFFFF + True + #FFFFFF + True + #000000 + True + #FFFFFF + True + #000000 + True + + + + Coca-Cola + #FFFFFF + True + #ED1C16 + True + #ED1C16 + True + #ED1C16 + True + #000000 + True + #000000 + True + #000000 + True + #FFFFFF + True + + + + Coca-Cola + + + + + + + IKEA + #003399 + True + #002369 + True + #FFCC00 + True + #003399 + True + #FFCC00 + True + #003399 + True + #FFCC00 + True + + + + IKEA + #003399 + True + #FFCC00 + True + #FFCC00 + True + #003399 + True + #FFCC00 + True + #003399 + True + #FFCC00 + True + + + + IKEA + #FFCC00 + True + #003399 + True + #003399 + True + #003399 + True + #003399 + True + #003399 + True + #FFCC00 + True + #000000 + True + + + + IKEA + + + + + diff --git a/theme_kit/doc/changelog.rst b/theme_kit/doc/changelog.rst index c992b2027d..1f763e8ae3 100644 --- a/theme_kit/doc/changelog.rst +++ b/theme_kit/doc/changelog.rst @@ -1,3 +1,14 @@ +`1.0.4` +------- + +- ADD: added color picker for mandatory fields + +`1.0.3` +------- + +- FIX: compatibility with material backend theme module + + `1.0.2` ------- diff --git a/theme_kit/i18n/es_CR.po b/theme_kit/i18n/es_CR.po index 556030d022..47c6137add 100644 --- a/theme_kit/i18n/es_CR.po +++ b/theme_kit/i18n/es_CR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Randall , 2018 msgid "" @@ -11,12 +11,11 @@ msgstr "" "POT-Creation-Date: 2018-04-30 21:57+0000\n" "PO-Revision-Date: 2018-04-30 21:57+0000\n" "Last-Translator: Randall , 2018\n" -"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/it-projects-" -"llc/teams/76080/es_CR/)\n" -"Language: es_CR\n" +"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/it-projects-llc/teams/76080/es_CR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" +"Language: es_CR\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: theme_kit @@ -43,9 +42,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -206,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" diff --git a/theme_kit/i18n/fr.po b/theme_kit/i18n/fr.po index 0228a7ff78..6b710d54a3 100644 --- a/theme_kit/i18n/fr.po +++ b/theme_kit/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Translation Bot , 2018 msgid "" @@ -11,12 +11,11 @@ msgstr "" "POT-Creation-Date: 2018-04-20 23:53+0000\n" "PO-Revision-Date: 2018-04-20 23:53+0000\n" "Last-Translator: Translation Bot , 2018\n" -"Language-Team: French (https://www.transifex.com/it-projects-llc/teams/76080/" -"fr/)\n" -"Language: fr\n" +"Language-Team: French (https://www.transifex.com/it-projects-llc/teams/76080/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" +"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: theme_kit @@ -24,16 +23,6 @@ msgstr "" msgid "#inbox - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"Help\" in Import tool" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"How-to\" in paypal" -msgstr "" - #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "[Page Title]" @@ -43,9 +32,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -114,6 +101,11 @@ msgid "" " " msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Apply" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg_active @@ -171,6 +163,11 @@ msgstr "" msgid "Button color" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Cancel" +msgstr "" + #. module: theme_kit #: model:ir.actions.act_window,help:theme_kit.ir_attachment_login_bg_action msgid "Click here to add new Wallpapers." @@ -206,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" @@ -272,72 +270,72 @@ msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_bg_active -msgid "Content Bg Active" +msgid "Content bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_button_active -msgid "Content Button Active" +msgid "Content button active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_footer_color_active -msgid "Content Footer Color Active" +msgid "Content footer color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_active -msgid "Content Form Active" +msgid "Content form active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_link_active -msgid "Content Form Link Active" +msgid "Content form link active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_text_active -msgid "Content Form Text Active" +msgid "Content form text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_title_active -msgid "Content Form Title Active" +msgid "Content form title active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_active -msgid "Content Loader Active" +msgid "Content loader active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_text_active -msgid "Content Loader Text Active" +msgid "Content loader text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_main_menu_font_color_active -msgid "Content Main Menu Font Color Active" +msgid "Content main menu font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg_active -msgid "Content Statusbar Bg Active" +msgid "Content statusbar bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_element_active -msgid "Content Statusbar Element Active" +msgid "Content statusbar element active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_font_color_active -msgid "Content Statusbar Font Color Active" +msgid "Content statusbar font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_text_active -msgid "Content Text Active" +msgid "Content text active" msgstr "" #. module: theme_kit @@ -378,11 +376,6 @@ msgstr "" msgid "Dashboard - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Discard" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_display_name #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_display_name @@ -392,21 +385,6 @@ msgstr "" msgid "Display Name" msgstr "Nom affiché" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Documentation" -msgstr "" - -#. module: theme_kit -#: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_new_documentation_website -msgid "Documentation Website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "DocumentationWebsite" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_config_company_logo msgid "" @@ -509,45 +487,45 @@ msgstr "Dernière mise à jour par" msgid "Last Updated on" msgstr "Dernière mise à jour le" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Left panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_bg_active -msgid "Left Panel Active Item Bg Active" +msgid "Left panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_font_active -msgid "Left Panel Active Item Font Active" +msgid "Left panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_bg_active -msgid "Left Panel Bg Active" +msgid "Left panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_bg_active -msgid "Left Panel Hover Item Bg Active" +msgid "Left panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_font_active -msgid "Left Panel Hover Item Font Active" +msgid "Left panel hover item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_main_menu_active -msgid "Left Panel Main Menu Active" +msgid "Left panel main menu active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_sub_menu_active -msgid "Left Panel Sub Menu Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Left panel" +msgid "Left panel sub menu active" msgstr "" #. module: theme_kit @@ -621,40 +599,6 @@ msgstr "" msgid "Page Title is used in Browser Tab name, for example
" msgstr "" -#. module: theme_kit -#: model:ir.model.fields,help:theme_kit.field_theme_kit_config_new_documentation_website -msgid "" -"Replaces links to documentation to custom website e.g.\n" -"* \"Help\" in Import tool\n" -"* \"How-to\" in paypal\n" -"* etc.\n" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Replaces links to documentation to custom website, for example
" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Save" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company favicon of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company logo of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the theme of your website" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_content_statusbar_bg @@ -734,45 +678,45 @@ msgstr "" msgid "These wallpapers are randomly shown on login page" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Top panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_bg_active -msgid "Top Panel Active Item Bg Active" +msgid "Top panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_font_active -msgid "Top Panel Active Item Font Active" +msgid "Top panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_bg_active -msgid "Top Panel Bg Active" +msgid "Top panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_border_active -msgid "Top Panel Border Active" +msgid "Top panel border active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_font_active -msgid "Top Panel Font Active" +msgid "Top panel font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_bg_active -msgid "Top Panel Hover Item Bg Active" +msgid "Top panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_font_active -msgid "Top Panel Hover Item Font Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Top panel" +msgid "Top panel hover item font active" msgstr "" #. module: theme_kit @@ -802,6 +746,11 @@ msgstr "" msgid "less" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "or" +msgstr "ou" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_less #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_less @@ -810,11 +759,6 @@ msgstr "" msgid "technical computed field" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "test test test" -msgstr "" - #. module: theme_kit #: model:ir.model,name:theme_kit.model_theme_kit_config msgid "theme_kit.config" @@ -839,6 +783,3 @@ msgstr "" #: model:ir.model,name:theme_kit.model_theme_kit_top_panel msgid "theme_kit.top_panel" msgstr "" - -#~ msgid "or" -#~ msgstr "ou" diff --git a/theme_kit/i18n/ru.po b/theme_kit/i18n/ru.po index be677c9987..4e6aba667e 100644 --- a/theme_kit/i18n/ru.po +++ b/theme_kit/i18n/ru.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Dinar , 2017 msgid "" @@ -11,31 +11,18 @@ msgstr "" "POT-Creation-Date: 2017-11-22 11:27+0000\n" "PO-Revision-Date: 2017-11-22 11:27+0000\n" "Last-Translator: Dinar , 2017\n" -"Language-Team: Russian (https://www.transifex.com/it-projects-llc/" -"teams/76080/ru/)\n" -"Language: ru\n" +"Language-Team: Russian (https://www.transifex.com/it-projects-llc/teams/76080/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" -"%100>=11 && n%100<=14)? 2 : 3);\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "#inbox - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"Help\" in Import tool" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"How-to\" in paypal" -msgstr "" - #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "[Page Title]" @@ -45,9 +32,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -116,6 +101,11 @@ msgid "" " " msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Apply" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg_active @@ -173,6 +163,11 @@ msgstr "" msgid "Button color" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Cancel" +msgstr "" + #. module: theme_kit #: model:ir.actions.act_window,help:theme_kit.ir_attachment_login_bg_action msgid "Click here to add new Wallpapers." @@ -208,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" @@ -274,72 +270,72 @@ msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_bg_active -msgid "Content Bg Active" +msgid "Content bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_button_active -msgid "Content Button Active" +msgid "Content button active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_footer_color_active -msgid "Content Footer Color Active" +msgid "Content footer color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_active -msgid "Content Form Active" +msgid "Content form active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_link_active -msgid "Content Form Link Active" +msgid "Content form link active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_text_active -msgid "Content Form Text Active" +msgid "Content form text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_title_active -msgid "Content Form Title Active" +msgid "Content form title active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_active -msgid "Content Loader Active" +msgid "Content loader active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_text_active -msgid "Content Loader Text Active" +msgid "Content loader text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_main_menu_font_color_active -msgid "Content Main Menu Font Color Active" +msgid "Content main menu font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg_active -msgid "Content Statusbar Bg Active" +msgid "Content statusbar bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_element_active -msgid "Content Statusbar Element Active" +msgid "Content statusbar element active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_font_color_active -msgid "Content Statusbar Font Color Active" +msgid "Content statusbar font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_text_active -msgid "Content Text Active" +msgid "Content text active" msgstr "" #. module: theme_kit @@ -380,11 +376,6 @@ msgstr "" msgid "Dashboard - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Discard" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_display_name #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_display_name @@ -394,21 +385,6 @@ msgstr "" msgid "Display Name" msgstr "Отображаемое имя" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Documentation" -msgstr "" - -#. module: theme_kit -#: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_new_documentation_website -msgid "Documentation Website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "DocumentationWebsite" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_config_company_logo msgid "" @@ -511,45 +487,45 @@ msgstr "" msgid "Last Updated on" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Left panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_bg_active -msgid "Left Panel Active Item Bg Active" +msgid "Left panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_font_active -msgid "Left Panel Active Item Font Active" +msgid "Left panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_bg_active -msgid "Left Panel Bg Active" +msgid "Left panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_bg_active -msgid "Left Panel Hover Item Bg Active" +msgid "Left panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_font_active -msgid "Left Panel Hover Item Font Active" +msgid "Left panel hover item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_main_menu_active -msgid "Left Panel Main Menu Active" +msgid "Left panel main menu active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_sub_menu_active -msgid "Left Panel Sub Menu Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Left panel" +msgid "Left panel sub menu active" msgstr "" #. module: theme_kit @@ -623,40 +599,6 @@ msgstr "" msgid "Page Title is used in Browser Tab name, for example
" msgstr "" -#. module: theme_kit -#: model:ir.model.fields,help:theme_kit.field_theme_kit_config_new_documentation_website -msgid "" -"Replaces links to documentation to custom website e.g.\n" -"* \"Help\" in Import tool\n" -"* \"How-to\" in paypal\n" -"* etc.\n" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Replaces links to documentation to custom website, for example
" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Save" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company favicon of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company logo of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the theme of your website" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_content_statusbar_bg @@ -736,45 +678,45 @@ msgstr "" msgid "These wallpapers are randomly shown on login page" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Top panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_bg_active -msgid "Top Panel Active Item Bg Active" +msgid "Top panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_font_active -msgid "Top Panel Active Item Font Active" +msgid "Top panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_bg_active -msgid "Top Panel Bg Active" +msgid "Top panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_border_active -msgid "Top Panel Border Active" +msgid "Top panel border active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_font_active -msgid "Top Panel Font Active" +msgid "Top panel font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_bg_active -msgid "Top Panel Hover Item Bg Active" +msgid "Top panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_font_active -msgid "Top Panel Hover Item Font Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Top panel" +msgid "Top panel hover item font active" msgstr "" #. module: theme_kit @@ -804,6 +746,11 @@ msgstr "" msgid "less" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "or" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_less #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_less @@ -812,11 +759,6 @@ msgstr "" msgid "technical computed field" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "test test test" -msgstr "" - #. module: theme_kit #: model:ir.model,name:theme_kit.model_theme_kit_config msgid "theme_kit.config" diff --git a/theme_kit/i18n/sl.po b/theme_kit/i18n/sl.po index 543a776c22..d4b2a031a2 100644 --- a/theme_kit/i18n/sl.po +++ b/theme_kit/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Translation Bot , 2018 msgid "" @@ -11,14 +11,12 @@ msgstr "" "POT-Creation-Date: 2018-04-17 16:30+0000\n" "PO-Revision-Date: 2018-04-17 16:30+0000\n" "Last-Translator: Translation Bot , 2018\n" -"Language-Team: Slovenian (https://www.transifex.com/it-projects-llc/" -"teams/76080/sl/)\n" -"Language: sl\n" +"Language-Team: Slovenian (https://www.transifex.com/it-projects-llc/teams/76080/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" -"%100==4 ? 2 : 3);\n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config @@ -44,9 +42,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -207,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" diff --git a/theme_kit/models/__init__.py b/theme_kit/models/__init__.py index f162f3c0ca..6d9c006895 100644 --- a/theme_kit/models/__init__.py +++ b/theme_kit/models/__init__.py @@ -1,3 +1,3 @@ -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import theme from . import res_config diff --git a/theme_kit/models/__pycache__/__init__.cpython-36.pyc b/theme_kit/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a4fe2b0cb6085d10dd7e4f80951e47574c7bd2f GIT binary patch literal 211 zcmX|)u?oU45QZeBUZX5s zb28^`p7h{jm`@0I@Wbd4?~QP65UqDtT?Q1`9j#Mctx;HmkJ@}2D%Eu+Rw6!;`3ErLGSPErNQ8HgPtcSQi92*Km7B=RVd z-Cg-Cg3il12vETPMuEQespy}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Vk*=-?pu_{-70Y@9Ht zGRi&Dg!N@NSlt2MM}utkOPuaaoX%U_sTjh5{Tj&-NMC0??EebMTS(ppavvH;PT@tr z3cnrvnH{qQ*s%dUfFBck+xi7gR=bW2{1zU>2j133(D-d2LQ8aER65Zi;^Dq_3ekq; z2+PK|#x*EQL`7F+OpG0jEc>Bs2LYr65!BhGY%IiN?{^Gq-uDiWa(xKrGK}YtDu*}u z-c8=Or85ipERByK6V1Z+SReGHO*7@p=8Qfe@sz^->0OXRdPGmbMO6rCf_m+Yl}FHS z0*&KNG`**nJ7<~UWuIS_ZlLmW5J)cw>TCu5RuKGY5vG{Afos$$+zsMvM&TG4dP%wu z;KKEOp3zmJl-3BWS*1&9|31z_wp1Yli8T{+3W*$3XPrsWK-o}fP~|=7LotlinKIl4 z`cmcBh^A=}taf@H2XEnAnAtE#^IrgQAu(DiZQ2c2w=Fn$qhr9^*u1g%hSKf3?6;sP zoxGr6f5Gth)vg#?#4!EJ&LLD=9z(@`fPWCwhpY8h0Vv%&wcqZc85}dMYi!$=`6Hs1 Bob~_! literal 0 HcmV?d00001 diff --git a/theme_kit/models/__pycache__/theme.cpython-36.pyc b/theme_kit/models/__pycache__/theme.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c021b76bed1a0503a77b89ee6c3777f9feb3cc22 GIT binary patch literal 35864 zcmeHQTaOz@cIIt3_lq>Tj4rm@vK@)`kXp-jvYE9NTe7vzuB2=t0SinvA)4%-8IDLc zUES1$o=FhMKma2~E(pb?Tf`Rp%VOx4OFYxUc0 zIph3SnU~q!GsXqu;#Zm7v&I&>d8t45_`qzLy>*BFRG&1Q3V-Vt9_lUgaVgthVCEOy z1~ZM`rjp0%R6BaxZ1%3)wVD>w9@VM5t?l9cvDMLjM2RR}v>n!H@AuC6Wt--nBMV;* z7QT;EQMz}=FH^VLj@fp4mx2ZE%B1zXUE8r*+TBNwZr=aw(W85%99zO@_va0BPwzIJ z-lEL$gGc?sUCe54%Q5Q*?M7X1Y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 zL9h?*aJ#A=QgRL5qn5U9=`fX5{cOFQ2NziQ6Giaj|Q@Y zArSlB0RU9=Vf3>F=^Vj)iV}ZG`13Jdf=>6B;DA5u8{(Kh3y1tv+r!dIzhD`b#jr(| zziWVfPG%R@oR(G54Fh`3m6~pwl?KEA>K9Odujn?+vFuv6Z8S|rZu}Y44>J9^2bN(r v**ry%w|_=%Xm~SWKOxXx_^@Re-KKe)YOu*A{kiN${%rZ|A7_4u@7ezaNdKHl literal 0 HcmV?d00001 diff --git a/theme_kit/models/res_config.py b/theme_kit/models/res_config.py index 0aad3024dd..469adcf0c4 100644 --- a/theme_kit/models/res_config.py +++ b/theme_kit/models/res_config.py @@ -1,63 +1,51 @@ # Copyright 2016 Ivan Yelizariev # Copyright 2016,2018 Dinar Gabbasov -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). import hashlib -from odoo import api, fields, models +from openerp import models, fields, api -CUSTOM_CSS_ARCH = """ +CUSTOM_CSS_ARCH = ''' %s -""" +''' class Config(models.TransientModel): - _name = "theme_kit.config" - _inherit = "res.config.settings" + _name = 'theme_kit.config' + _inherit = 'res.config.settings' - theme_id = fields.Many2one("theme_kit.theme", string="Color Scheme") - favicon_id = fields.Many2one("ir.attachment", string="Favicon") + theme_id = fields.Many2one('theme_kit.theme', string="Color Scheme") + favicon_id = fields.Many2one('ir.attachment', string="Favicon") - page_title = fields.Char( - "Page Title", - help="""Anything you want to see in page title, e.g. + page_title = fields.Char('Page Title', help='''Anything you want to see in page title, e.g. * CompanyName * CompanyName's Portal * CompanyName's Operation System * etc. - """, - ) - system_name = fields.Char( - "System Name", - help="""e.g. + ''') + system_name = fields.Char('System Name', help='''e.g. * CompanyName's Portal * CompanyName's Operation System * etc. - """, - ) - company_logo = fields.Binary( - "Company Logo", - help="Due to browser cache, old logo may be still shown. To fix that, clear browser cache", - ) - - wallpapers_count = fields.Integer("Wallpapers", readonly=True) - - new_documentation_website = fields.Char( - "Documentation Website", - help="""Replaces links to documentation to custom website e.g. + ''') + company_logo = fields.Binary('Company Logo', help="Due to browser cache, old logo may be still shown. To fix that, clear browser cache") + + wallpapers_count = fields.Integer('Wallpapers', readonly=True) + + new_documentation_website = fields.Char('Documentation Website', help='''Replaces links to documentation to custom website e.g. * "Help" in Import tool * "How-to" in paypal * etc. -""", - ) +''') @api.model def get_values(self): res = super(Config, self).get_values() - ICPSudo = self.env["ir.config_parameter"].sudo() + ICPSudo = self.env['ir.config_parameter'].sudo() theme_id = ICPSudo.get_param("theme_kit.current_theme_id", default=False) if theme_id: @@ -67,13 +55,9 @@ def get_values(self): favicon_id = int(favicon_id) page_title = ICPSudo.get_param("web_debranding.new_title", default=False) system_name = ICPSudo.get_param("web_debranding.new_name", default=False) - new_documentation_website = ICPSudo.get_param( - "web_debranding.new_documentation_website", default=False - ) + new_documentation_website = ICPSudo.get_param("web_debranding.new_documentation_website", default=False) company_logo = self.env.user.company_id.logo - wallpapers_count = self.env["ir.attachment"].search_count( - [("use_as_background", "=", True)] - ) + wallpapers_count = self.env['ir.attachment'].search_count([('use_as_background', '=', True)]) res.update( company_logo=company_logo, @@ -82,46 +66,37 @@ def get_values(self): page_title=page_title, system_name=system_name, new_documentation_website=new_documentation_website, - wallpapers_count=wallpapers_count, + wallpapers_count=wallpapers_count ) return res @api.multi def set_values(self): super(Config, self).set_values() - ICPSudo = self.env["ir.config_parameter"].sudo() - ICPSudo.set_param( - "theme_kit.current_theme_id", getattr(self, "theme_id").id or "" - ) - ICPSudo.set_param( - "theme_kit.current_favicon_id", getattr(self, "favicon_id").id or "" - ) - ICPSudo.set_param("web_debranding.new_title", self.page_title or "") - ICPSudo.set_param("web_debranding.new_name", self.system_name or "") - ICPSudo.set_param( - "web_debranding.new_documentation_website", - self.new_documentation_website or "", - ) + ICPSudo = self.env['ir.config_parameter'].sudo() + ICPSudo.set_param('theme_kit.current_theme_id', getattr(self, 'theme_id').id or '') + ICPSudo.set_param('theme_kit.current_favicon_id', getattr(self, 'favicon_id').id or '') + ICPSudo.set_param('web_debranding.new_title', getattr(self, 'page_title') or '') + ICPSudo.set_param('web_debranding.new_name', getattr(self, 'system_name') or '') + ICPSudo.set_param('web_debranding.new_documentation_website', getattr(self, 'new_documentation_website') or '') # set company logo self.env.user.company_id.logo = self.company_logo # set theme - custom_css = self.env.ref("theme_kit.custom_css") - code = "" + custom_css = self.env.ref('theme_kit.custom_css') + code = '' if self.theme_id: code = self.theme_id.code arch = CUSTOM_CSS_ARCH % code - custom_css.write({"arch": arch}) + custom_css.write({'arch': arch}) # set favicon - url = "" + url = '' if self.favicon_id: url = self.favicon_id.url or self._attachment2url(self.favicon_id) - ICPSudo.set_param("web_debranding.favicon_url", url) + ICPSudo.set_param('web_debranding.favicon_url', url) def _attachment2url(self, att): - sha = hashlib.sha1(getattr(att, "__last_update").encode("utf-8")).hexdigest()[ - 0:7 - ] - return "/web/image/{}-{}".format(att.id, sha) + sha = hashlib.sha1(getattr(att, '__last_update').encode('utf-8')).hexdigest()[0:7] + return '/web/image/%s-%s' % (att.id, sha) diff --git a/theme_kit/models/theme.py b/theme_kit/models/theme.py index 74468e3a5d..83b76b88ae 100644 --- a/theme_kit/models/theme.py +++ b/theme_kit/models/theme.py @@ -1,33 +1,26 @@ # Copyright 2016 Ivan Yelizariev # Copyright 2016,2018 Dinar Gabbasov -# License MIT (https://opensource.org/licenses/MIT). - -from odoo import api, fields, models +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). +from odoo import models, fields, api from odoo.addons.base.ir.ir_qweb.assetsbundle import AssetsBundle, LessStylesheetAsset class Theme(models.Model): _name = "theme_kit.theme" - name = fields.Char("Name", required=True) - top_panel_id = fields.Many2one( - "theme_kit.top_panel", string="Color Schemes for Top Panel" - ) - left_panel_id = fields.Many2one( - "theme_kit.left_panel", string="Color Schemes for Left Panel" - ) - content_id = fields.Many2one( - "theme_kit.content", string="Color Schemes for Content" - ) + name = fields.Char('Name', required=True) + top_panel_id = fields.Many2one('theme_kit.top_panel', string="Color Schemes for Top Panel") + left_panel_id = fields.Many2one('theme_kit.left_panel', string="Color Schemes for Left Panel") + content_id = fields.Many2one('theme_kit.content', string="Color Schemes for Content") custom_css = fields.Text(string="Custom CSS/LESS", default=False) custom_js = fields.Text(string="Custom JS", default=False) - code = fields.Text("Code", help="technical computed field", compute="_compute_code") + code = fields.Text('Code', help='technical computed field', compute='_compute_code') @api.multi def _compute_code(self): for r in self: - code = "" + code = '' if r.top_panel_id: code = code + r.top_panel_id.less if r.left_panel_id: @@ -40,95 +33,59 @@ def _compute_code(self): code = self.generate_less2css(code) if r.custom_js: js_code = r.custom_js - js_code = ( - "try {" - + js_code - + """ + js_code = 'try {' + js_code + ''' } catch (err) { console.log('Error' + err.name + ":" + err.message + ". " + err.stack); alert('Error' + err.name + ":" + err.message + ". " + err.stack); - }""" - ) - code = ( - code - + """""" - ) + }''' + code = code + '''''' r.code = code def generate_less2css(self, code): - bundle = AssetsBundle("theme_kit.dummy", [], []) - assets = LessStylesheetAsset(bundle, inline=code, url="") + bundle = AssetsBundle('theme_kit.dummy', [], []) + assets = LessStylesheetAsset(bundle, inline=code, url='') cmd = assets.get_command() source = assets.get_source() compiled = bundle.compile_css(cmd, source) - compiled = ( - """""" - ) + compiled = '''''' return compiled class ThemeTopPanel(models.Model): _name = "theme_kit.top_panel" - name = fields.Char("Name", required=True) - - top_panel_bg = fields.Char("Background color", help="Menu Bar color for Top Panel") - top_panel_bg_active = fields.Boolean( - default=False, help="Menu Bar color for Top Panel" - ) - - top_panel_border = fields.Char("Border color", help="Border color for Top Panel") - top_panel_border_active = fields.Boolean( - default=False, help="Border color for Top Panel" - ) - - top_panel_font = fields.Char("Font color", help="Font color for Top Panel") - top_panel_font_active = fields.Boolean( - default=False, help="Font color for Top Panel" - ) - - top_panel_active_item_font = fields.Char( - "Active item Font color", help="Active item Font color for Top Panel" - ) - top_panel_active_item_font_active = fields.Boolean( - default=False, help="Active item Font color for Top Panel" - ) - - top_panel_active_item_bg = fields.Char( - "Active item Background color", - help="Active item Background color for Top Panel", - ) - top_panel_active_item_bg_active = fields.Boolean( - default=False, help="Active item Background color for Top Panel" - ) - - top_panel_hover_item_font = fields.Char( - "Hover item Font color", help="Hover item Font color for Top Panel" - ) - top_panel_hover_item_font_active = fields.Boolean( - default=False, help="Hover item Font color for Top Panel" - ) - - top_panel_hover_item_bg = fields.Char( - "Hover item Background color", help="Hover item Background color for Top Panel" - ) - top_panel_hover_item_bg_active = fields.Boolean( - default=False, help="Hover item Background color for Top Panel" - ) - - less = fields.Text("less", help="technical computed field", compute="_compute_less") + name = fields.Char('Name', required=True) + + top_panel_bg = fields.Char('Background color', help="Menu Bar color for Top Panel") + top_panel_bg_active = fields.Boolean(default=False, help="Menu Bar color for Top Panel") + + top_panel_border = fields.Char('Border color', help="Border color for Top Panel") + top_panel_border_active = fields.Boolean(default=False, help="Border color for Top Panel") + + top_panel_font = fields.Char('Font color', help="Font color for Top Panel") + top_panel_font_active = fields.Boolean(default=False, help="Font color for Top Panel") + + top_panel_active_item_font = fields.Char('Active item Font color', help="Active item Font color for Top Panel") + top_panel_active_item_font_active = fields.Boolean(default=False, help="Active item Font color for Top Panel") + + top_panel_active_item_bg = fields.Char('Active item Background color', help="Active item Background color for Top Panel") + top_panel_active_item_bg_active = fields.Boolean(default=False, help="Active item Background color for Top Panel") + + top_panel_hover_item_font = fields.Char('Hover item Font color', help="Hover item Font color for Top Panel") + top_panel_hover_item_font_active = fields.Boolean(default=False, help="Hover item Font color for Top Panel") + + top_panel_hover_item_bg = fields.Char('Hover item Background color', help="Hover item Background color for Top Panel") + top_panel_hover_item_bg_active = fields.Boolean(default=False, help="Hover item Background color for Top Panel") + + less = fields.Text('less', help='technical computed field', compute='_compute_less') @api.multi def _compute_less(self): for r in self: - code = "" + code = '' # double {{ will be formated as single { if self.top_panel_bg_active: - code = ( - code - + """ + code = code + ''' #oe_main_menu_navbar {{ background-color: {theme.top_panel_bg}; }} @@ -154,13 +111,18 @@ def _compute_less(self): .datepicker .table-condensed > thead th:hover {{ background-color: darken({theme.top_panel_bg}, 15%) !important; }} + ''' + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """nav.navbar.navbar-default.main-nav {{ + background-color: {theme.top_panel_bg}!important + }} """ ) if self.top_panel_border_active: - code = ( - code - + """.o_main_navbar{{ + code = code + '''.o_main_navbar{{ border-color: {theme.top_panel_border}; }} #oe_main_menu_navbar{{ @@ -181,12 +143,9 @@ def _compute_less(self): .o_list_view thead > tr > th {{ border-color: {theme.top_panel_border}; }} - """ - ) + ''' if self.top_panel_font_active: - code = ( - code - + """.o_main_navbar > ul > li > a {{ + code = code + '''.o_main_navbar > ul > li > a {{ color: {theme.top_panel_font}!important; }} .navbar-nav li a {{ @@ -229,26 +188,17 @@ def _compute_less(self): .datepicker .table-condensed > thead {{ color: {theme.top_panel_font}!important; }} - """ - ) + ''' if self.top_panel_active_item_font_active: - code = ( - code - + """.navbar-nav .active a{{ + code = code + '''.navbar-nav .active a{{ color: {theme.top_panel_active_item_font}!important; - }}""" - ) + }}''' if self.top_panel_active_item_bg_active: - code = ( - code - + """.navbar-nav .active a{{ + code = code + '''.navbar-nav .active a{{ background-color: {theme.top_panel_active_item_bg}!important; - }}""" - ) + }}''' if self.top_panel_hover_item_font_active: - code = ( - code - + """.o_main_navbar > ul > li > a:hover{{ + code = code + '''.o_main_navbar > ul > li > a:hover{{ color: {theme.top_panel_hover_item_font}!important; }} .o_main_navbar > ul > li > a:focus{{ @@ -278,12 +228,9 @@ def _compute_less(self): .dropdown-menu > li > a:focus {{ color: {theme.top_panel_hover_item_font}!important; }} - """ - ) + ''' if self.top_panel_hover_item_bg_active: - code = ( - code - + """.o_main_navbar > ul > li > a:hover{{ + code = code + '''.o_main_navbar > ul > li > a:hover{{ background-color: {theme.top_panel_hover_item_bg}!important; }} .o_main_navbar > ul > li > a:focus{{ @@ -307,79 +254,48 @@ def _compute_less(self): .open .dropdown-menu > li a:focus {{ background-color: {theme.top_panel_hover_item_bg}!important; }} - """ - ) - code = code.format(theme=r) + ''' + code = code.format( + theme=r, + ) self.less = code class ThemeLeftPanel(models.Model): _name = "theme_kit.left_panel" - name = fields.Char("Name", required=True) - - left_panel_bg = fields.Char( - "Background color", help="Background Color for Left Menu Bar" - ) - left_panel_bg_active = fields.Boolean( - default=False, help="Background Color for Left Menu Bar" - ) - - left_panel_main_menu = fields.Char( - "Main Menu Font color", help="Main Menu Font colo for Left Menu Bar" - ) - left_panel_main_menu_active = fields.Boolean( - default=False, help="Main Menu Font colo for Left Menu Bar" - ) - - left_panel_sub_menu = fields.Char( - "Sub Menu Font color", help="Sub Menu Font colo for Left Menu Bar" - ) - left_panel_sub_menu_active = fields.Boolean( - default=False, help="Sub Menu Font colo for Left Menu Bar" - ) - - left_panel_active_item_font = fields.Char( - "Active item Font color", help="Active item Font color for Left Menu Bar" - ) - left_panel_active_item_font_active = fields.Boolean( - default=False, help="Active item Font color for Left Menu Bar" - ) - - left_panel_active_item_bg = fields.Char( - "Active item Background color", - help="Active item Background color for Left Menu Bar", - ) - left_panel_active_item_bg_active = fields.Boolean( - default=False, help="Active item Background color for Left Menu Bar" - ) - - left_panel_hover_item_font = fields.Char( - "Hover item Font color", help="Hover item Font color for Left Menu Bar" - ) - left_panel_hover_item_font_active = fields.Boolean( - default=False, help="Hover item Font color for Left Menu Bar" - ) - - left_panel_hover_item_bg = fields.Char( - "Hover item Background color", - help="Hover item Background color for Left Menu Bar", - ) - left_panel_hover_item_bg_active = fields.Boolean( - default=False, help="Hover item Background color for Left Menu Bar" - ) - - less = fields.Text("less", help="technical computed field", compute="_compute_less") + name = fields.Char('Name', required=True) + + left_panel_bg = fields.Char('Background color', help="Background Color for Left Menu Bar") + left_panel_bg_active = fields.Boolean(default=False, help="Background Color for Left Menu Bar") + + left_panel_main_menu = fields.Char('Main Menu Font color', help="Main Menu Font colo for Left Menu Bar") + left_panel_main_menu_active = fields.Boolean(default=False, help="Main Menu Font colo for Left Menu Bar") + + left_panel_sub_menu = fields.Char('Sub Menu Font color', help="Sub Menu Font colo for Left Menu Bar") + left_panel_sub_menu_active = fields.Boolean(default=False, help="Sub Menu Font colo for Left Menu Bar") + + left_panel_active_item_font = fields.Char('Active item Font color', help="Active item Font color for Left Menu Bar") + left_panel_active_item_font_active = fields.Boolean(default=False, help="Active item Font color for Left Menu Bar") + + left_panel_active_item_bg = fields.Char('Active item Background color', help="Active item Background color for Left Menu Bar") + left_panel_active_item_bg_active = fields.Boolean(default=False, help="Active item Background color for Left Menu Bar") + + left_panel_hover_item_font = fields.Char('Hover item Font color', help="Hover item Font color for Left Menu Bar") + left_panel_hover_item_font_active = fields.Boolean(default=False, help="Hover item Font color for Left Menu Bar") + + left_panel_hover_item_bg = fields.Char('Hover item Background color', help="Hover item Background color for Left Menu Bar") + left_panel_hover_item_bg_active = fields.Boolean(default=False, help="Hover item Background color for Left Menu Bar") + + less = fields.Text('less', help='technical computed field', compute='_compute_less') @api.multi def _compute_less(self): for r in self: # double {{ will be formated as single { - code = "" + code = '' if self.left_panel_bg_active: - code = ( - code - + """.o_web_client > .o_main .o_sub_menu {{ + code = code + '''.o_web_client > .o_main .o_sub_menu {{ background-color: {theme.left_panel_bg}!important; }} @@ -405,12 +321,17 @@ def _compute_less(self): color: {theme.left_panel_bg}!important; }} }} + ''' + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """.app-sidebar-panel {{ + background-color: {theme.left_panel_bg}!important + }} """ ) if self.left_panel_main_menu_active: - code = ( - code - + """.o_sub_menu .oe_secondary_menu_section{{ + code = code + '''.o_sub_menu .oe_secondary_menu_section{{ color: {theme.left_panel_main_menu}!important; }} .o_sub_menu .oe_secondary_menu_section .oe_menu_leaf{{ @@ -434,12 +355,9 @@ def _compute_less(self): .o_kanban_view .o_kanban_group {{ background-color: {theme.left_panel_main_menu}; }} - """ - ) + ''' if self.left_panel_sub_menu_active: - code = ( - code - + """.o_sub_menu .oe_secondary_submenu .oe_menu_text{{ + code = code + '''.o_sub_menu .oe_secondary_submenu .oe_menu_text{{ color: {theme.left_panel_sub_menu}; }} .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item {{ @@ -451,12 +369,9 @@ def _compute_less(self): .o_mail_request_permission a:hover {{ color: darken({theme.left_panel_sub_menu}, 10%)!important; }} - """ - ) + ''' if self.left_panel_active_item_font_active: - code = ( - code - + """.o_sub_menu .oe_secondary_submenu .active .oe_menu_text{{ + code = code + '''.o_sub_menu .oe_secondary_submenu .active .oe_menu_text{{ color: {theme.left_panel_active_item_font}!important; }} .o_sub_menu .oe_secondary_submenu a:focus .oe_menu_text{{ @@ -465,12 +380,9 @@ def _compute_less(self): .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item.o_active {{ color: {theme.left_panel_active_item_font}!important; }} - """ - ) + ''' if self.left_panel_active_item_bg_active: - code = ( - code - + """.o_sub_menu .oe_secondary_submenu .active a{{ + code = code + '''.o_sub_menu .oe_secondary_submenu .active a{{ background-color: {theme.left_panel_active_item_bg}!important; }} .o_sub_menu .oe_secondary_submenu a:focus{{ @@ -479,110 +391,95 @@ def _compute_less(self): .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item.o_active {{ background-color: {theme.left_panel_active_item_bg}!important; }} - """ - ) + ''' if self.left_panel_hover_item_font_active: - code = ( - code - + """.o_sub_menu .oe_secondary_submenu a:hover .oe_menu_text{{ + code = code + '''.o_sub_menu .oe_secondary_submenu a:hover .oe_menu_text{{ color: {theme.left_panel_hover_item_font}!important; }} .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item:hover {{ color: {theme.left_panel_hover_item_font}!important; }} - """ - ) + ''' if self.left_panel_hover_item_bg_active: - code = ( - code - + """.o_sub_menu .oe_secondary_submenu a:hover{{ + code = code + '''.o_sub_menu .oe_secondary_submenu a:hover{{ background-color: {theme.left_panel_hover_item_bg}!important; }} .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item:hover {{ background-color: {theme.left_panel_hover_item_bg}!important; }} + ''' + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """a.nav-link:hover {{ + background-color: {theme.left_panel_hover_item_bg}!important; + color: {theme.left_panel_hover_item_font}!important; + }} """ ) - code = code.format(theme=r) + code = code.format( + theme=r, + ) self.less = code class ThemeContent(models.Model): _name = "theme_kit.content" - name = fields.Char("Name", required=True) + name = fields.Char('Name', required=True) - content_bg = fields.Char("Background color", help="Color for Main page") + content_bg = fields.Char('Background color', help="Color for Main page") content_bg_active = fields.Boolean(default=False, help="Color for Main page") - content_button = fields.Char("Button color", help="Button Color for Main page") - content_button_active = fields.Boolean( - default=False, help="Button Color for Main page" - ) + content_button = fields.Char('Button color', help="Button Color for Main page") + content_button_active = fields.Boolean(default=False, help="Button Color for Main page") - content_form = fields.Char("Background form color", help="Background form color") + content_form = fields.Char('Background form color', help="Background form color") content_form_active = fields.Boolean(default=False, help="Background form color") - content_form_text = fields.Char("Text form color") + content_form_text = fields.Char('Text form color') content_form_text_active = fields.Boolean(default=False, help="Text form color") - content_form_title = fields.Char("Text title form color") - content_form_title_active = fields.Boolean( - default=False, help="Text title form color" - ) + content_form_title = fields.Char('Text title form color') + content_form_title_active = fields.Boolean(default=False, help="Text title form color") - content_text = fields.Char("Text content color") + content_text = fields.Char('Text content color') content_text_active = fields.Boolean(default=False, help="Text content color") - content_form_link = fields.Char("Link form color") + content_form_link = fields.Char('Link form color') content_form_link_active = fields.Boolean(default=False, help="Link form color") - content_loader = fields.Char("Loader color") + content_loader = fields.Char('Loader color') content_loader_active = fields.Boolean(default=False, help="Loader color") - content_loader_text = fields.Char("Loader text color") + content_loader_text = fields.Char('Loader text color') content_loader_text_active = fields.Boolean(default=False, help="Loader text color") - content_statusbar_bg = fields.Char( - "Status Bar Background color", help="Status Bar Background color" - ) - content_statusbar_bg_active = fields.Boolean( - default=False, help="Status Bar Background color" - ) - - content_statusbar_element = fields.Char( - "Status Bar Current State color", help="Status Bar Current State color" - ) - content_statusbar_element_active = fields.Boolean( - default=False, help="Status Bar Current State Background color" - ) - - content_statusbar_font_color = fields.Char( - "Status Bar Font color", help="Status Bar Font color" - ) - content_statusbar_font_color_active = fields.Boolean( - default=False, help="Status Bar Font color" - ) - - content_main_menu_font_color = fields.Char( - "Main menu font color", help="Main menu font color" - ) - content_main_menu_font_color_active = fields.Boolean( - default=False, help="Main menu font color" - ) + content_statusbar_bg = fields.Char("Status Bar Background color", help="Status Bar Background color") + content_statusbar_bg_active = fields.Boolean(default=False, help="Status Bar Background color") + + content_statusbar_element = fields.Char("Status Bar Current State color", help="Status Bar Current State color") + content_statusbar_element_active = fields.Boolean(default=False, help="Status Bar Current State Background color") + + content_statusbar_font_color = fields.Char("Status Bar Font color", help="Status Bar Font color") + content_statusbar_font_color_active = fields.Boolean(default=False, help="Status Bar Font color") + + content_main_menu_font_color = fields.Char("Main menu font color", help="Main menu font color") + content_main_menu_font_color_active = fields.Boolean(default=False, help="Main menu font color") content_footer_color = fields.Char("Footer color", help="Footer color") content_footer_color_active = fields.Boolean(default=False, help="Footer color") - less = fields.Text("less", help="technical computed field", compute="_compute_less") + less = fields.Text('less', help='technical computed field', compute='_compute_less') + + content_required_field_back_color = fields.Char("Mandatory field background color", help="Mandatory field background color") + content_required_field_back_color_active = fields.Boolean(default=False, help="Mandatory field background color") @api.multi def _compute_less(self): for r in self: - code = "" + code = '' if self.content_bg_active: - code = ( - code - + """.breadcrumb{{ + code = code + '''.breadcrumb{{ background-color: {theme.content_bg}!important; }} .o_control_panel{{ @@ -658,13 +555,10 @@ def _compute_less(self): .o_application_switcher .o_app:hover{{ background-color: darken({theme.content_bg}, 1%) !important; }} - """ - ) + ''' if self.content_form_active: - code = ( - code - + """.o_form{{ + code = code + '''.o_form{{ background-color: {theme.content_form} }} .table-responsive{{ @@ -716,12 +610,9 @@ def _compute_less(self): .bootstrap-datetimepicker-widget td.day:hover, .bootstrap-datetimepicker-widget td.hour:hover, .bootstrap-datetimepicker-widget td.minute:hover, .bootstrap-datetimepicker-widget td.second:hover {{ background-color: lighten({theme.content_form}, 15%); }} - """ - ) + ''' if self.content_form_text_active: - code = ( - code - + """.o_form_view {{ + code = code + '''.o_form_view {{ color: {theme.content_form_text}; }} .o_form {{ @@ -751,12 +642,9 @@ def _compute_less(self): .datepicker .table-condensed {{ color: {theme.content_form_text}; }} - """ - ) + ''' if self.content_form_link_active: - code = ( - code - + """ .o_main_content a {{ + code = code + ''' .o_main_content a {{ color: {theme.content_form_link}; }} .o_control_panel .breadcrumb > li > a {{ @@ -768,12 +656,9 @@ def _compute_less(self): .o_control_panel .o_cp_right, .o_control_panel .o_pager_previous, .o_control_panel .o_pager_next {{ color: {theme.content_form_link}; }} - """ - ) + ''' if self.content_button_active: - code = ( - code - + """.oe_highlight, + code = code + '''.oe_highlight, .o_button.btn-primary, .btn-primary{{ background-color: {theme.content_button} !important; @@ -797,20 +682,14 @@ def _compute_less(self): .o_searchview .o_searchview_facet .o_facet_remove {{ color: {theme.content_button} !important; }} - """ - ) + ''' if self.content_text_active: - code = ( - code - + """.o_main{{ + code = code + '''.o_main{{ color: {theme.content_text} !important; }} - """ - ) + ''' if self.content_form_title_active: - code = ( - code - + """.o_horizontal_separator {{ + code = code + '''.o_horizontal_separator {{ color: {theme.content_form_title} !important; }} .o_main .o_horizontal_separator {{ @@ -825,28 +704,19 @@ def _compute_less(self): .breadcrumb > li + li:before {{ color: {theme.content_form_title} !important; }} - """ - ) + ''' if self.content_loader_active: - code = ( - code - + """.o_loading {{ + code = code + '''.o_loading {{ background: {theme.content_loader}!important; border: 1px solid {theme.content_loader}!important; color: darken({theme.content_loader},40%)!important; - }}""" - ) + }}''' if self.content_loader_text_active: - code = ( - code - + """.o_loading {{ + code = code + '''.o_loading {{ color: {theme.content_loader_text}!important; - }}""" - ) + }}''' if self.content_statusbar_bg_active: - code = ( - code - + """.o_form_statusbar {{ + code = code + '''.o_form_statusbar {{ background-color: {theme.content_statusbar_bg}!important; }} .o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:before, @@ -857,12 +727,9 @@ def _compute_less(self): .o_form_statusbar .btn-default {{ background-color: {theme.content_statusbar_bg}!important; }} - """ - ) + ''' if self.content_statusbar_element_active: - code = ( - code - + """.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled{{ + code = code + '''.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled{{ background-color: {theme.content_statusbar_element}!important; }} .o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled .o_arrow_button:after{{ @@ -878,12 +745,9 @@ def _compute_less(self): .o_form_statusbar .btn-default:hover, .o_form_statusbar .btn-default:focus {{ background-color: {theme.content_statusbar_element}!important; }} - """ - ) + ''' if self.content_statusbar_font_color_active: - code = ( - code - + """.o_form_view .o_form_statusbar .o_statusbar_status .o_arrow_button {{ + code = code + '''.o_form_view .o_form_statusbar .o_statusbar_status .o_arrow_button {{ color: lighten({theme.content_statusbar_font_color}, 25%) }} .o_form_view .o_form_statusbar .o_statusbar_status .o_arrow_button.btn-primary.disabled {{ @@ -895,24 +759,24 @@ def _compute_less(self): .o_form_view .o_form_statusbar .o_statusbar_status .dropdown-menu .o_arrow_button {{ color: {theme.content_statusbar_font_color}!important }} - """ - ) + ''' if self.content_main_menu_font_color_active: - code = ( - code - + """.o_application_switcher .o_caption {{ + code = code + '''.o_application_switcher .o_caption {{ color: {theme.content_main_menu_font_color}!important }} - """ - ) + ''' if self.content_footer_color_active: - code = ( - code - + """.o_view_manager_content {{ + code = code + '''.o_view_manager_content {{ background-color: {theme.content_footer_color}!important }} - """ - ) + ''' + if self.content_required_field_back_color_active: + code = code + '''.o_field_char.o_field_widget.o_input.o_required_modifier{{ + background-color: {theme.content_required_field_back_color}!important + }} + ''' - code = code.format(theme=r) + code = code.format( + theme=r, + ) self.less = code diff --git a/theme_kit/views/ir_attachment.xml b/theme_kit/views/ir_attachment.xml index d3dbccbb4f..71856fefce 100644 --- a/theme_kit/views/ir_attachment.xml +++ b/theme_kit/views/ir_attachment.xml @@ -1,22 +1,20 @@ - + + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> - - Login page wallpapers - ir.actions.act_window - ir.attachment - form - - - {"default_use_as_background": 1, "default_public": 1, "default_name": "Wallpaper"}}}} - [('use_as_background', '=', True)] - -

+ + Login page wallpapers + ir.actions.act_window + ir.attachment + form + + + {"default_use_as_background": 1, "default_public": 1, "default_name": "Wallpaper"}}}} + [('use_as_background', '=', True)] + +

Click here to add new Wallpapers.

-
-
+ +
diff --git a/theme_kit/views/res_config.xml b/theme_kit/views/res_config.xml index 1b65969144..a34f5f4c0d 100644 --- a/theme_kit/views/res_config.xml +++ b/theme_kit/views/res_config.xml @@ -1,218 +1,154 @@ - + + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> - - - Brand settings - theme_kit.config - -
-
-
- + + + + Brand settings + theme_kit.config + + +
+
+ +
+
+
-
-
-
-
-
-
-

Logo

-
-
-
-