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 0000000000..6a4fe2b0cb Binary files /dev/null and b/theme_kit/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/theme_kit/models/__pycache__/res_config.cpython-36.pyc b/theme_kit/models/__pycache__/res_config.cpython-36.pyc new file mode 100644 index 0000000000..b933689d26 Binary files /dev/null and b/theme_kit/models/__pycache__/res_config.cpython-36.pyc differ 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 0000000000..c021b76bed Binary files /dev/null and b/theme_kit/models/__pycache__/theme.cpython-36.pyc differ 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

-
-
-
-