diff --git a/third_party_addons/muk_web_appsbar/LICENSE b/third_party_addons/muk_web_appsbar/LICENSE new file mode 100644 index 000000000..0a041280b --- /dev/null +++ b/third_party_addons/muk_web_appsbar/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/third_party_addons/muk_web_appsbar/__init__.py b/third_party_addons/muk_web_appsbar/__init__.py new file mode 100644 index 000000000..df1b93441 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/__init__.py @@ -0,0 +1,14 @@ +from . import models + +import base64 + +from odoo.tools import file_open + + +def _setup_module(env): + if env.ref('base.main_company', False): + with file_open('base/static/img/res_company_logo.png', 'rb') as file: + env.ref('base.main_company').write({ + 'appbar_image': base64.b64encode(file.read()) + }) + \ No newline at end of file diff --git a/third_party_addons/muk_web_appsbar/__manifest__.py b/third_party_addons/muk_web_appsbar/__manifest__.py new file mode 100644 index 000000000..5991be93b --- /dev/null +++ b/third_party_addons/muk_web_appsbar/__manifest__.py @@ -0,0 +1,73 @@ +{ + 'name': 'MuK AppsBar', + 'summary': 'Adds a sidebar to the main screen', + 'description': ''' + This module adds a sidebar to the main screen. The sidebar has a list + of all installed apps similar to the home menu to ease navigation. + ''', + 'version': '18.0.1.1.3', + 'category': 'Tools/UI', + 'license': 'LGPL-3', + 'author': 'MuK IT', + 'website': 'http://www.mukit.at', + 'live_test_url': 'https://my.mukit.at/r/f6m', + 'contributors': [ + 'Mathias Markl ', + ], + 'depends': [ + 'base_setup', + 'web', + ], + 'data': [ + 'templates/webclient.xml', + 'views/res_users.xml', + 'views/res_config_settings.xml', + ], + 'assets': { + 'web._assets_primary_variables': [ + 'muk_web_appsbar/static/src/scss/variables.scss', + ], + 'web._assets_backend_helpers': [ + 'muk_web_appsbar/static/src/scss/mixins.scss', + ], + 'web.assets_web_dark': [ + ( + 'after', + 'muk_web_appsbar/static/src/scss/variables.scss', + 'muk_web_appsbar/static/src/scss/variables.dark.scss', + ), + ], + 'web.assets_backend': [ + ( + 'after', + 'web/static/src/webclient/webclient.js', + 'muk_web_appsbar/static/src/webclient/webclient.js', + ), + ( + 'after', + 'web/static/src/webclient/webclient.xml', + 'muk_web_appsbar/static/src/webclient/webclient.xml', + ), + ( + 'after', + 'web/static/src/webclient/webclient.js', + 'muk_web_appsbar/static/src/webclient/menus/app_menu_service.js', + ), + ( + 'after', + 'web/static/src/webclient/webclient.js', + 'muk_web_appsbar/static/src/webclient/appsbar/appsbar.js', + ), + 'muk_web_appsbar/static/src/webclient/webclient.scss', + 'muk_web_appsbar/static/src/webclient/appsbar/appsbar.xml', + 'muk_web_appsbar/static/src/webclient/appsbar/appsbar.scss', + ], + }, + 'images': [ + 'static/description/banner.png', + ], + 'installable': True, + 'application': False, + 'auto_install': False, + 'post_init_hook': '_setup_module', +} diff --git a/third_party_addons/muk_web_appsbar/doc/changelog.rst b/third_party_addons/muk_web_appsbar/doc/changelog.rst new file mode 100644 index 000000000..659d822e0 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/doc/changelog.rst @@ -0,0 +1,9 @@ +`1.1.0` +------- + +- Use CSS Grid + +`1.0.0` +------- + +- Initial Release diff --git a/third_party_addons/muk_web_appsbar/doc/index.rst b/third_party_addons/muk_web_appsbar/doc/index.rst new file mode 100644 index 000000000..8f6f787e3 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/doc/index.rst @@ -0,0 +1,59 @@ +=========== +MuK AppsBar +=========== + +This module adds a sidebar to the main screen. The sidebar has a list +of all installed apps similar to the home menu to ease navigation. + +Installation +============ + +To install this module, you need to: + +Download the module and add it to your Odoo addons folder. Afterward, log on to +your Odoo server and go to the Apps menu. Trigger the debug mode and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Upgrade +============ + +To upgrade this module, you need to: + +Download the module and add it to your Odoo addons folder. Restart the server +and log on to your Odoo server. Select the Apps menu and upgrade the module by +clicking on the upgrade button. + +Configuration +============= + +Each user can define in their profile the display of the sidebar. The options +are to show the large version, the small version, or hide the sidebar completely. +In addition, an image can be added for each company, which is displayed at the +bottom of the sidebar. + +Usage +============= + +Is the sidebar is activated it will be automatically displayed on the left side of +the systems UI. + +Credits +======= + +Contributors +------------ + +* Mathias Markl + +Author & Maintainer +------------------- + +This module is maintained by the `MuK IT GmbH `_. + +MuK IT is an Austrian company specialized in customizing and extending Odoo. +We develop custom solutions for your individual needs to help you focus on +your strength and expertise to grow your business. + +If you want to get in touch please contact us via mail +(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/third_party_addons/muk_web_appsbar/i18n/de.po b/third_party_addons/muk_web_appsbar/i18n/de.po new file mode 100644 index 000000000..d65dfebe7 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/i18n/de.po @@ -0,0 +1,78 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * muk_web_appsbar +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-06 14:43+0000\n" +"PO-Revision-Date: 2024-11-06 14:43+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: muk_web_appsbar +#: model:ir.model.fields,field_description:muk_web_appsbar.field_res_company__appbar_image +#: model:ir.model.fields,field_description:muk_web_appsbar.field_res_config_settings__appbar_image +msgid "Apps Menu Footer Image" +msgstr "Apps Menü Fusszeilen Bild" + +#. module: muk_web_appsbar +#: model_terms:ir.ui.view,arch_db:muk_web_appsbar.view_res_config_settings_form +msgid "AppsBar" +msgstr "AppsLeiste" + +#. module: muk_web_appsbar +#: model:ir.model,name:muk_web_appsbar.model_res_company +msgid "Companies" +msgstr "Unternehmen" + +#. module: muk_web_appsbar +#: model:ir.model,name:muk_web_appsbar.model_res_config_settings +msgid "Config Settings" +msgstr "Konfigurationseinstellungen" + +#. module: muk_web_appsbar +#: model:ir.model,name:muk_web_appsbar.model_ir_http +msgid "HTTP Routing" +msgstr "HTTP-Routing" + +#. module: muk_web_appsbar +#: model:ir.model.fields.selection,name:muk_web_appsbar.selection__res_users__sidebar_type__invisible +msgid "Invisible" +msgstr "Unsichtbar" + +#. module: muk_web_appsbar +#: model:ir.model.fields.selection,name:muk_web_appsbar.selection__res_users__sidebar_type__large +msgid "Large" +msgstr "Groß" + +#. module: muk_web_appsbar +#. odoo-javascript +#: code:addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.xml:0 +msgid "Logo" +msgstr "Logo" + +#. module: muk_web_appsbar +#: model_terms:ir.ui.view,arch_db:muk_web_appsbar.view_res_config_settings_form +msgid "Set your own Logo for the appsbar" +msgstr "Legen Sie ihr eigenes Logo für die Appsleiste fest" + +#. module: muk_web_appsbar +#: model:ir.model.fields,field_description:muk_web_appsbar.field_res_users__sidebar_type +msgid "Sidebar Type" +msgstr "Seitenleiste Typ" + +#. module: muk_web_appsbar +#: model:ir.model.fields.selection,name:muk_web_appsbar.selection__res_users__sidebar_type__small +msgid "Small" +msgstr "Klein" + +#. module: muk_web_appsbar +#: model:ir.model,name:muk_web_appsbar.model_res_users +msgid "User" +msgstr "Benutzer" \ No newline at end of file diff --git a/third_party_addons/muk_web_appsbar/models/__init__.py b/third_party_addons/muk_web_appsbar/models/__init__.py new file mode 100644 index 000000000..49f6c60bd --- /dev/null +++ b/third_party_addons/muk_web_appsbar/models/__init__.py @@ -0,0 +1,4 @@ +from . import ir_http +from . import res_users +from . import res_company +from . import res_config_settings diff --git a/third_party_addons/muk_web_appsbar/models/ir_http.py b/third_party_addons/muk_web_appsbar/models/ir_http.py new file mode 100644 index 000000000..2c6a7231d --- /dev/null +++ b/third_party_addons/muk_web_appsbar/models/ir_http.py @@ -0,0 +1,20 @@ +from odoo import models +from odoo.http import request + + +class IrHttp(models.AbstractModel): + + _inherit = "ir.http" + + #---------------------------------------------------------- + # Functions + #---------------------------------------------------------- + + def session_info(self): + result = super(IrHttp, self).session_info() + if request.env.user._is_internal(): + for company in request.env.user.company_ids.with_context(bin_size=True): + result['user_companies']['allowed_companies'][company.id].update({ + 'has_appsbar_image': bool(company.appbar_image), + }) + return result diff --git a/third_party_addons/muk_web_appsbar/models/res_company.py b/third_party_addons/muk_web_appsbar/models/res_company.py new file mode 100644 index 000000000..b55d9afda --- /dev/null +++ b/third_party_addons/muk_web_appsbar/models/res_company.py @@ -0,0 +1,15 @@ +from odoo import models, fields + + +class ResCompany(models.Model): + + _inherit = 'res.company' + + #---------------------------------------------------------- + # Fields + #---------------------------------------------------------- + + appbar_image = fields.Binary( + string='Apps Menu Footer Image', + attachment=True + ) diff --git a/third_party_addons/muk_web_appsbar/models/res_config_settings.py b/third_party_addons/muk_web_appsbar/models/res_config_settings.py new file mode 100644 index 000000000..94e72feee --- /dev/null +++ b/third_party_addons/muk_web_appsbar/models/res_config_settings.py @@ -0,0 +1,15 @@ +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + + _inherit = 'res.config.settings' + + #---------------------------------------------------------- + # Fields + #---------------------------------------------------------- + + appbar_image = fields.Binary( + related='company_id.appbar_image', + readonly=False + ) diff --git a/third_party_addons/muk_web_appsbar/models/res_users.py b/third_party_addons/muk_web_appsbar/models/res_users.py new file mode 100644 index 000000000..06f821091 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/models/res_users.py @@ -0,0 +1,37 @@ +from odoo import models, fields, api + + +class ResUsers(models.Model): + + _inherit = 'res.users' + + #---------------------------------------------------------- + # Properties + #---------------------------------------------------------- + + @property + def SELF_READABLE_FIELDS(self): + return super().SELF_READABLE_FIELDS + [ + 'sidebar_type', + ] + + @property + def SELF_WRITEABLE_FIELDS(self): + return super().SELF_WRITEABLE_FIELDS + [ + 'sidebar_type', + ] + + #---------------------------------------------------------- + # Fields + #---------------------------------------------------------- + + sidebar_type = fields.Selection( + selection=[ + ('invisible', 'Invisible'), + ('small', 'Small'), + ('large', 'Large') + ], + string="Sidebar Type", + default='large', + required=True, + ) diff --git a/third_party_addons/muk_web_appsbar/static/description/banner.png b/third_party_addons/muk_web_appsbar/static/description/banner.png new file mode 100644 index 000000000..92b06c549 Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/banner.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/icon.png b/third_party_addons/muk_web_appsbar/static/description/icon.png new file mode 100644 index 000000000..fa9ac0efb Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/icon.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/icon.svg b/third_party_addons/muk_web_appsbar/static/description/icon.svg new file mode 100644 index 000000000..9518f0e06 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/third_party_addons/muk_web_appsbar/static/description/index.html b/third_party_addons/muk_web_appsbar/static/description/index.html new file mode 100644 index 000000000..98d0fcb94 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/description/index.html @@ -0,0 +1,155 @@ +
+
+

MuK Colors

+

Customize your Odoo colors

+ +

MuK IT GmbH - www.mukit.at

+
+ + Community + + + Enterprise + +
+
+ +
+
+
+ +
+
+
+

Overview

+

+ This module adds a sidebar to the main screen. The sidebar has a list of all + installed apps similar to the home menu to ease navigation. Each user can define + in their profile the display of the sidebar. The options are to show the large + version, the small version, or hide the sidebar completely. In addition, an image + can be added for each company, which is displayed at the bottom of the sidebar. +

+
+
+
+ +
+
+
+

Settings

+

+ To set up the sidebar, the user can open their preferences or profile, depending on + whether the HR module is installed. The sidebar settings can now be changed via a + corresponding field. You will need to refresh your browser for the change to take effect. +

+
+ +
+
+
+
+ +
+
+

+ Want more? +

+

+ Are you having troubles with your Odoo integration? Or do you feel + your system lacks of essential features?
If your answer is YES + to one of the above questions, feel free to contact us at anytime + with your inquiry.
We are looking forward to discuss your + needs and plan the next steps with you.
+

+
+ +
+ +
+
+

Our Services

+
+
+
+
+ +
+

+ Odoo
Development +

+
+
+
+
+
+ +
+

+ Odoo
Integration +

+
+
+
+
+
+ +
+

+ Odoo
Infrastructure +

+
+
+
+
+
+ +
+

+ Odoo
Training +

+
+
+
+
+
+ +
+

+ Odoo
Support +

+
+
+
+
+
diff --git a/third_party_addons/muk_web_appsbar/static/description/logo.png b/third_party_addons/muk_web_appsbar/static/description/logo.png new file mode 100644 index 000000000..9427ce33e Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/logo.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/screenshot.png b/third_party_addons/muk_web_appsbar/static/description/screenshot.png new file mode 100644 index 000000000..17cfd6370 Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/screenshot.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/screenshot_user.png b/third_party_addons/muk_web_appsbar/static/description/screenshot_user.png new file mode 100644 index 000000000..c1782d2e3 Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/screenshot_user.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/service_development.png b/third_party_addons/muk_web_appsbar/static/description/service_development.png new file mode 100644 index 000000000..d64b66bda Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/service_development.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/service_infrastructure.png b/third_party_addons/muk_web_appsbar/static/description/service_infrastructure.png new file mode 100644 index 000000000..b899a3104 Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/service_infrastructure.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/service_integration.png b/third_party_addons/muk_web_appsbar/static/description/service_integration.png new file mode 100644 index 000000000..76c5e80f4 Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/service_integration.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/service_support.png b/third_party_addons/muk_web_appsbar/static/description/service_support.png new file mode 100644 index 000000000..4c530fafd Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/service_support.png differ diff --git a/third_party_addons/muk_web_appsbar/static/description/service_training.png b/third_party_addons/muk_web_appsbar/static/description/service_training.png new file mode 100644 index 000000000..19ea76e63 Binary files /dev/null and b/third_party_addons/muk_web_appsbar/static/description/service_training.png differ diff --git a/third_party_addons/muk_web_appsbar/static/src/scss/mixins.scss b/third_party_addons/muk_web_appsbar/static/src/scss/mixins.scss new file mode 100644 index 000000000..dcd23ea4b --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/scss/mixins.scss @@ -0,0 +1,7 @@ +@mixin mk-disable-scrollbar { + scrollbar-width: none; + -ms-overflow-style: none; + &::-webkit-scrollbar { + display: none; + } +} diff --git a/third_party_addons/muk_web_appsbar/static/src/scss/variables.dark.scss b/third_party_addons/muk_web_appsbar/static/src/scss/variables.dark.scss new file mode 100644 index 000000000..c773cdc6a --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/scss/variables.dark.scss @@ -0,0 +1,2 @@ +$mk-appbar-color: #E4E4E4 !default; +$mk-appbar-background: #3C3E4B !default; diff --git a/third_party_addons/muk_web_appsbar/static/src/scss/variables.scss b/third_party_addons/muk_web_appsbar/static/src/scss/variables.scss new file mode 100644 index 000000000..19921046e --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/scss/variables.scss @@ -0,0 +1,6 @@ +$mk-appbar-color: #dee2e6 !default; +$mk-appbar-active: $o-brand-primary !default; +$mk-appbar-background: #111827 !default; + +$mk-sidebar-large-width: 146px !default; +$mk-sidebar-small-width: 46px !default; diff --git a/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.js b/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.js new file mode 100644 index 000000000..145370435 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.js @@ -0,0 +1,31 @@ +import { url } from '@web/core/utils/urls'; +import { useService } from '@web/core/utils/hooks'; + +import { Component, onWillUnmount } from '@odoo/owl'; + +export class AppsBar extends Component { + static template = 'muk_web_appsbar.AppsBar'; + static props = {}; + setup() { + this.companyService = useService('company'); + this.appMenuService = useService('app_menu'); + if (this.companyService.currentCompany.has_appsbar_image) { + this.sidebarImageUrl = url('/web/image', { + model: 'res.company', + field: 'appbar_image', + id: this.companyService.currentCompany.id, + }); + } + const renderAfterMenuChange = () => { + this.render(); + }; + this.env.bus.addEventListener( + 'MENUS:APP-CHANGED', renderAfterMenuChange + ); + onWillUnmount(() => { + this.env.bus.removeEventListener( + 'MENUS:APP-CHANGED', renderAfterMenuChange + ); + }); + } +} diff --git a/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.scss b/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.scss new file mode 100644 index 000000000..7f4135a24 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.scss @@ -0,0 +1,89 @@ +.mk_apps_sidebar_panel { + @include mk-disable-scrollbar(); + background-color: $mk-appbar-background; + width: var(--mk-sidebar-width, 0); + overflow-y: auto; + .mk_apps_sidebar { + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + white-space: nowrap; + .mk_apps_sidebar_menu { + padding: 0; + > li > a { + cursor: pointer; + font-size: 13px; + font-weight: 300; + overflow: hidden; + padding: 8px 11px; + text-decoration: none; + color: $mk-appbar-color; + text-overflow: ellipsis; + .mk_apps_sidebar_icon { + width: 22px; + height: 22px; + margin-right: 5px; + } + } + > li.active > a { + background: $mk-appbar-active; + } + > li:hover > a { + background: $mk-appbar-active; + } + } + } +} + +.mk_sidebar_type_large { + --mk-sidebar-width: #{$mk-sidebar-large-width}; +} + +.mk_sidebar_type_small { + --mk-sidebar-width: #{$mk-sidebar-small-width}; + .mk_apps_sidebar_name { + display: none; + } + .mk_apps_sidebar_icon { + margin-right: 0 !important; + } + .mk_apps_sidebar_logo { + display: none; + } +} + +.mk_sidebar_type_invisible { + --mk-sidebar-width: 0; +} + +.editor_has_snippets_hide_backend_navbar, +.o_home_menu_background, +.o_fullscreen { + --mk-sidebar-width: 0; +} + +.editor_has_snippets_hide_backend_navbar .mk_apps_sidebar_panel { + transition: width 300ms; +} + +@include media-breakpoint-only(md) { + .mk_sidebar_type_large { + --mk-sidebar-width: #{$mk-sidebar-small-width}; + .mk_apps_sidebar_name { + display: none; + } + .mk_apps_sidebar_icon { + margin-right: 0 !important; + } + .mk_apps_sidebar_logo { + display: none; + } + } +} + +@include media-breakpoint-down(md) { + .mk_sidebar_type_large, .mk_sidebar_type_small { + --mk-sidebar-width: 0; + } +} diff --git a/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.xml b/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.xml new file mode 100644 index 000000000..99c3428d2 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/webclient/appsbar/appsbar.xml @@ -0,0 +1,44 @@ + + + + + +
+
+ + +
+
+
+ +
diff --git a/third_party_addons/muk_web_appsbar/static/src/webclient/menus/app_menu_service.js b/third_party_addons/muk_web_appsbar/static/src/webclient/menus/app_menu_service.js new file mode 100644 index 000000000..ddb28c966 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/webclient/menus/app_menu_service.js @@ -0,0 +1,45 @@ +import { registry } from "@web/core/registry"; + +export const appMenuService = { + dependencies: ["menu"], + async start(env, { menu }) { + return { + getCurrentApp () { + return menu.getCurrentApp(); + }, + getAppsMenuItems() { + const menuItems = menu.getApps().map((item) => { + const appsMenuItem = { + id: item.id, + name: item.name, + xmlid: item.xmlid, + appID: item.appID, + actionID: item.actionID, + action: () => menu.selectMenu(item), + }; + if (item.webIconData) { + const prefix = ( + item.webIconData.startsWith('P') ? + 'data:image/svg+xml;base64,' : + 'data:image/png;base64,' + ); + appsMenuItem.webIconData = ( + item.webIconData.startsWith('data:image') ? + item.webIconData : + prefix + item.webIconData.replace(/\s/g, '') + ); + } + const hrefParts = [`menu_id=${item.id}`]; + if (item.actionID) { + hrefParts.push(`action=${item.actionID}`); + } + appsMenuItem.href = "#" + hrefParts.join("&"); + return appsMenuItem; + }); + return menuItems; + }, + }; + }, +}; + +registry.category("services").add("app_menu", appMenuService); diff --git a/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.js b/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.js new file mode 100644 index 000000000..0ab9cf97c --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.js @@ -0,0 +1,11 @@ +import { patch } from '@web/core/utils/patch'; + +import { WebClient } from '@web/webclient/webclient'; +import { AppsBar } from '@muk_web_appsbar/webclient/appsbar/appsbar'; + +patch(WebClient, { + components: { + ...WebClient.components, + AppsBar, + }, +}); diff --git a/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.scss b/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.scss new file mode 100644 index 000000000..0527f44e2 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.scss @@ -0,0 +1,29 @@ +.o_web_client { + display: grid !important; + grid-template-areas: + "banner banner" + "navbar navbar" + "sidebar content" + "components components"; + grid-template-rows: auto auto 1fr auto; + grid-template-columns: auto 1fr; + > div:has(#oe_neutralize_banner) { + grid-area: banner; + } + > .o_navbar { + grid-area: navbar; + } + > .mk_apps_sidebar_panel { + grid-area: sidebar; + } + > .o_action_manager { + grid-area: content; + } + > .o-main-components-container { + grid-area: components; + } + > iframe { + grid-column: 1 / -1; + width: 100%; + } +} \ No newline at end of file diff --git a/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.xml b/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.xml new file mode 100644 index 000000000..45bd36f45 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/static/src/webclient/webclient.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/third_party_addons/muk_web_appsbar/templates/webclient.xml b/third_party_addons/muk_web_appsbar/templates/webclient.xml new file mode 100644 index 000000000..742f06dfc --- /dev/null +++ b/third_party_addons/muk_web_appsbar/templates/webclient.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/third_party_addons/muk_web_appsbar/views/res_config_settings.xml b/third_party_addons/muk_web_appsbar/views/res_config_settings.xml new file mode 100644 index 000000000..76edd1b6d --- /dev/null +++ b/third_party_addons/muk_web_appsbar/views/res_config_settings.xml @@ -0,0 +1,20 @@ + + + + + + res.config.settings.form + res.config.settings + + + + +
+ +
+
+
+
+
+ +
diff --git a/third_party_addons/muk_web_appsbar/views/res_users.xml b/third_party_addons/muk_web_appsbar/views/res_users.xml new file mode 100644 index 000000000..a093c3726 --- /dev/null +++ b/third_party_addons/muk_web_appsbar/views/res_users.xml @@ -0,0 +1,16 @@ + + + + + + res.users.form + res.users + + + + + + + + + diff --git a/third_party_addons/muk_web_chatter/LICENSE b/third_party_addons/muk_web_chatter/LICENSE new file mode 100644 index 000000000..0a041280b --- /dev/null +++ b/third_party_addons/muk_web_chatter/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/third_party_addons/muk_web_chatter/__init__.py b/third_party_addons/muk_web_chatter/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/third_party_addons/muk_web_chatter/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/third_party_addons/muk_web_chatter/__manifest__.py b/third_party_addons/muk_web_chatter/__manifest__.py new file mode 100644 index 000000000..707774b32 --- /dev/null +++ b/third_party_addons/muk_web_chatter/__manifest__.py @@ -0,0 +1,54 @@ +{ + 'name': 'MuK Chatter', + 'summary': 'Adds options for the chatter', + 'description': ''' + This module improves the design of the chatter and adds a user + preference to set the position of the chatter in the form view. + ''', + 'version': '18.0.1.2.3', + 'category': 'Tools/UI', + 'license': 'LGPL-3', + 'author': 'MuK IT', + 'website': 'http://www.mukit.at', + 'live_test_url': 'https://my.mukit.at/r/f6m', + 'contributors': [ + 'Mathias Markl ', + ], + 'depends': [ + 'mail', + ], + 'data': [ + 'views/res_users.xml', + ], + 'assets': { + 'web._assets_primary_variables': [ + ( + 'after', + 'web/static/src/scss/primary_variables.scss', + 'muk_web_chatter/static/src/scss/variables.scss' + ), + ], + 'web.assets_backend': [ + 'muk_web_chatter/static/src/core/**/*.*', + 'muk_web_chatter/static/src/chatter/*.scss', + 'muk_web_chatter/static/src/chatter/*.xml', + ( + 'after', + 'mail/static/src/chatter/web_portal/chatter.js', + 'muk_web_chatter/static/src/chatter/chatter.js' + ), + ( + 'after', + 'mail/static/src/chatter/web/form_compiler.js', + 'muk_web_chatter/static/src/views/form/form_compiler.js' + ), + 'muk_web_chatter/static/src/views/form/form_renderer.js', + ], + }, + 'images': [ + 'static/description/banner.png', + ], + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/third_party_addons/muk_web_chatter/doc/changelog.rst b/third_party_addons/muk_web_chatter/doc/changelog.rst new file mode 100644 index 000000000..bb063cc85 --- /dev/null +++ b/third_party_addons/muk_web_chatter/doc/changelog.rst @@ -0,0 +1,15 @@ +`1.2.0` +------- + +- Hide Notifications + +`1.1.0` +------- + +- Resize Chatter + + +`1.0.0` +------- + +- Initial Release diff --git a/third_party_addons/muk_web_chatter/doc/index.rst b/third_party_addons/muk_web_chatter/doc/index.rst new file mode 100644 index 000000000..7984aeb7b --- /dev/null +++ b/third_party_addons/muk_web_chatter/doc/index.rst @@ -0,0 +1,57 @@ +=========== +MuK Chatter +=========== + +This module improves the design of the chatter and adds a user +preference to set the position of the chatter in the form view. + +Installation +============ + +To install this module, you need to: + +Download the module and add it to your Odoo addons folder. Afterward, log on to +your Odoo server and go to the Apps menu. Trigger the debug mode and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Upgrade +============ + +To upgrade this module, you need to: + +Download the module and add it to your Odoo addons folder. Restart the server +and log on to your Odoo server. Select the Apps menu and upgrade the module by +clicking on the upgrade button. + +Configuration +============= + +Each user can define in their profile the display of the chatter. The options +are to show the chatter on the side or at the bottom. + +Usage +============= + +The design improvements are automatically activated as soon as the module +is installed. + +Credits +======= + +Contributors +------------ + +* Mathias Markl + +Author & Maintainer +------------------- + +This module is maintained by the `MuK IT GmbH `_. + +MuK IT is an Austrian company specialized in customizing and extending Odoo. +We develop custom solutions for your individual needs to help you focus on +your strength and expertise to grow your business. + +If you want to get in touch please contact us via mail +(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/third_party_addons/muk_web_chatter/i18n/de.po b/third_party_addons/muk_web_chatter/i18n/de.po new file mode 100644 index 000000000..2c371c8e5 --- /dev/null +++ b/third_party_addons/muk_web_chatter/i18n/de.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * muk_web_chatter +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-06 14:05+0000\n" +"PO-Revision-Date: 2024-11-06 14:05+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: muk_web_chatter +#: model:ir.model.fields.selection,name:muk_web_chatter.selection__res_users__chatter_position__bottom +msgid "Bottom" +msgstr "Unten" + +#. module: muk_web_chatter +#: model:ir.model.fields,field_description:muk_web_chatter.field_res_users__chatter_position +msgid "Chatter Position" +msgstr "Chatterposition" + +#. module: muk_web_chatter +#: model:ir.model,name:muk_web_chatter.model_ir_http +msgid "HTTP Routing" +msgstr "HTTP-Routing" + +#. module: muk_web_chatter +#. odoo-javascript +#: code:addons/muk_web_chatter/static/src/chatter/chatter.xml:0 +msgid "Log note" +msgstr "Log-Notiz" + +#. module: muk_web_chatter +#. odoo-javascript +#: code:addons/muk_web_chatter/static/src/chatter/chatter.xml:0 +msgid "Send message" +msgstr "Nachricht senden" + +#. module: muk_web_chatter +#. odoo-javascript +#: code:addons/muk_web_chatter/static/src/chatter/chatter.xml:0 +msgid "Show/Hide Notifications" +msgstr "Benachrichtigungen ein-/ausblenden" + +#. module: muk_web_chatter +#: model:ir.model.fields.selection,name:muk_web_chatter.selection__res_users__chatter_position__side +msgid "Side" +msgstr "Seite" + +#. module: muk_web_chatter +#: model:ir.model,name:muk_web_chatter.model_res_users +msgid "User" +msgstr "Benutzer" \ No newline at end of file diff --git a/third_party_addons/muk_web_chatter/models/__init__.py b/third_party_addons/muk_web_chatter/models/__init__.py new file mode 100644 index 000000000..5d0cb8306 --- /dev/null +++ b/third_party_addons/muk_web_chatter/models/__init__.py @@ -0,0 +1,2 @@ +from . import ir_http +from . import res_users diff --git a/third_party_addons/muk_web_chatter/models/ir_http.py b/third_party_addons/muk_web_chatter/models/ir_http.py new file mode 100644 index 000000000..9ece1eaf2 --- /dev/null +++ b/third_party_addons/muk_web_chatter/models/ir_http.py @@ -0,0 +1,16 @@ +from odoo import models +from odoo.http import request + + +class IrHttp(models.AbstractModel): + + _inherit = "ir.http" + + #---------------------------------------------------------- + # Functions + #---------------------------------------------------------- + + def session_info(self): + result = super(IrHttp, self).session_info() + result['chatter_position'] = self.env.user.chatter_position + return result diff --git a/third_party_addons/muk_web_chatter/models/res_users.py b/third_party_addons/muk_web_chatter/models/res_users.py new file mode 100644 index 000000000..16a349855 --- /dev/null +++ b/third_party_addons/muk_web_chatter/models/res_users.py @@ -0,0 +1,36 @@ +from odoo import models, fields, api + + +class ResUsers(models.Model): + + _inherit = 'res.users' + + #---------------------------------------------------------- + # Properties + #---------------------------------------------------------- + + @property + def SELF_READABLE_FIELDS(self): + return super().SELF_READABLE_FIELDS + [ + 'chatter_position', + ] + + @property + def SELF_WRITEABLE_FIELDS(self): + return super().SELF_WRITEABLE_FIELDS + [ + 'chatter_position', + ] + + #---------------------------------------------------------- + # Fields + #---------------------------------------------------------- + + chatter_position = fields.Selection( + selection=[ + ('side', 'Side'), + ('bottom', 'Bottom'), + ], + string="Chatter Position", + default='side', + required=True, + ) diff --git a/third_party_addons/muk_web_chatter/static/description/banner.png b/third_party_addons/muk_web_chatter/static/description/banner.png new file mode 100644 index 000000000..db12c14b3 Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/banner.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/icon.png b/third_party_addons/muk_web_chatter/static/description/icon.png new file mode 100644 index 000000000..20619a74e Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/icon.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/icon.svg b/third_party_addons/muk_web_chatter/static/description/icon.svg new file mode 100644 index 000000000..5e1e7e56f --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/description/icon.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/third_party_addons/muk_web_chatter/static/description/index.html b/third_party_addons/muk_web_chatter/static/description/index.html new file mode 100644 index 000000000..9500839e3 --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/description/index.html @@ -0,0 +1,171 @@ +
+
+

MuK Chatter

+

Adds options for the chatter

+ +

MuK IT GmbH - www.mukit.at

+
+ + Community + + + Enterprise + +
+
+ +
+
+
+ +
+
+
+

Overview

+

+ This module improves the design of the chatter and adds a user preference + to set the position of the chatter in the form view. Each user can define in + their profile the display of the chatter. The options are to show the chatter + on the side or at the bottom. +

+
+
+
+ +
+
+
+

Chatter Features

+

+ The chat buttons have been improved to become an icon in mobile view to make + better use of space. The chat can also be resized by dragging the divider and + reset by double-clicking. The top bar icon can be used to hide log entries to + improve the readability of the chat. +

+
+ +
+
+
+
+ +
+
+
+

User Settings

+

+ Each user can individually set whether the chatter should be displayed on + the side or below the form view. After changing the setting, a browser + refresh is required for the change to become active. +

+
+ +
+
+
+
+ +
+
+

+ Want more? +

+

+ Are you having troubles with your Odoo integration? Or do you feel + your system lacks of essential features?
If your answer is YES + to one of the above questions, feel free to contact us at anytime + with your inquiry.
We are looking forward to discuss your + needs and plan the next steps with you.
+

+
+ +
+ +
+
+

Our Services

+
+
+
+
+ +
+

+ Odoo
Development +

+
+
+
+
+
+ +
+

+ Odoo
Integration +

+
+
+
+
+
+ +
+

+ Odoo
Infrastructure +

+
+
+
+
+
+ +
+

+ Odoo
Training +

+
+
+
+
+
+ +
+

+ Odoo
Support +

+
+
+
+
+
diff --git a/third_party_addons/muk_web_chatter/static/description/logo.png b/third_party_addons/muk_web_chatter/static/description/logo.png new file mode 100644 index 000000000..9427ce33e Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/logo.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/screenshot.png b/third_party_addons/muk_web_chatter/static/description/screenshot.png new file mode 100644 index 000000000..bad94d7b1 Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/screenshot.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/screenshot_sidebar.png b/third_party_addons/muk_web_chatter/static/description/screenshot_sidebar.png new file mode 100644 index 000000000..45367af5c Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/screenshot_sidebar.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/screenshot_user.png b/third_party_addons/muk_web_chatter/static/description/screenshot_user.png new file mode 100644 index 000000000..11c58b2c6 Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/screenshot_user.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/service_development.png b/third_party_addons/muk_web_chatter/static/description/service_development.png new file mode 100644 index 000000000..d64b66bda Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/service_development.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/service_infrastructure.png b/third_party_addons/muk_web_chatter/static/description/service_infrastructure.png new file mode 100644 index 000000000..b899a3104 Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/service_infrastructure.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/service_integration.png b/third_party_addons/muk_web_chatter/static/description/service_integration.png new file mode 100644 index 000000000..76c5e80f4 Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/service_integration.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/service_support.png b/third_party_addons/muk_web_chatter/static/description/service_support.png new file mode 100644 index 000000000..4c530fafd Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/service_support.png differ diff --git a/third_party_addons/muk_web_chatter/static/description/service_training.png b/third_party_addons/muk_web_chatter/static/description/service_training.png new file mode 100644 index 000000000..19ea76e63 Binary files /dev/null and b/third_party_addons/muk_web_chatter/static/description/service_training.png differ diff --git a/third_party_addons/muk_web_chatter/static/src/chatter/chatter.js b/third_party_addons/muk_web_chatter/static/src/chatter/chatter.js new file mode 100644 index 000000000..4f1875758 --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/chatter/chatter.js @@ -0,0 +1,26 @@ +import { patch } from "@web/core/utils/patch"; +import { browser } from "@web/core/browser/browser"; + +import { Chatter } from "@mail/chatter/web_portal/chatter"; + +patch(Chatter.prototype, { + setup() { + super.setup(); + const showNotificationMessages = browser.localStorage.getItem( + 'muk_web_chatter.notifications' + ); + this.state.showNotificationMessages = ( + showNotificationMessages != null ? + JSON.parse(showNotificationMessages) : true + ); + }, + onClickNotificationsToggle() { + const showNotificationMessages = !this.state.showNotificationMessages; + browser.localStorage.setItem( + 'muk_web_chatter.notifications', showNotificationMessages + ); + this.state.showNotificationMessages = showNotificationMessages; + }, +}); + + diff --git a/third_party_addons/muk_web_chatter/static/src/chatter/chatter.scss b/third_party_addons/muk_web_chatter/static/src/chatter/chatter.scss new file mode 100644 index 000000000..10e0a040b --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/chatter/chatter.scss @@ -0,0 +1,15 @@ +.o-mail-Chatter-top:has(.o-mail-Chatter-sendMessage.active) .o-mail-Composer-send { + @extend .btn-danger +} + +.o-mail-Form-chatter.o-aside { + .mk_chatter_resize { + top: 0; + bottom: 0; + z-index: 1; + width: 5px; + height: 100%; + cursor: col-resize; + position: absolute; + } +} diff --git a/third_party_addons/muk_web_chatter/static/src/chatter/chatter.xml b/third_party_addons/muk_web_chatter/static/src/chatter/chatter.xml new file mode 100644 index 000000000..6ec95f714 --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/chatter/chatter.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + props.isChatterAside and props.hasAttachmentPreview and state.thread.attachmentsInWebClientView.length + + + + + + state.showNotificationMessages + + + \ No newline at end of file diff --git a/third_party_addons/muk_web_chatter/static/src/core/thread/thread.js b/third_party_addons/muk_web_chatter/static/src/core/thread/thread.js new file mode 100644 index 000000000..1cdb9a6b0 --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/core/thread/thread.js @@ -0,0 +1,30 @@ +import { patch } from "@web/core/utils/patch"; + +import { Thread } from '@mail/core/common/thread'; + +patch(Thread.prototype, { + get displayMessages() { + let messages = ( + this.props.order === 'asc' ? + this.props.thread.nonEmptyMessages : + [...this.props.thread.nonEmptyMessages].reverse() + ); + if (!this.props.showNotificationMessages) { + messages = messages.filter( + (msg) => !['user_notification', 'notification'].includes( + msg.message_type + ) + ); + } + return messages; + }, +}); + +Thread.props = [ + ...Thread.props, + 'showNotificationMessages?', +]; +Thread.defaultProps = { + ...Thread.defaultProps, + showNotificationMessages: true, +}; \ No newline at end of file diff --git a/third_party_addons/muk_web_chatter/static/src/core/thread/thread.xml b/third_party_addons/muk_web_chatter/static/src/core/thread/thread.xml new file mode 100644 index 000000000..a5902fef5 --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/core/thread/thread.xml @@ -0,0 +1,13 @@ + + + + + + displayMessages + + + diff --git a/third_party_addons/muk_web_chatter/static/src/scss/variables.scss b/third_party_addons/muk_web_chatter/static/src/scss/variables.scss new file mode 100644 index 000000000..e3adfc499 --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/scss/variables.scss @@ -0,0 +1,2 @@ +$o-form-renderer-max-width: 3840px; +$o-form-view-sheet-max-width: 2560px; diff --git a/third_party_addons/muk_web_chatter/static/src/views/form/form_compiler.js b/third_party_addons/muk_web_chatter/static/src/views/form/form_compiler.js new file mode 100644 index 000000000..ad1b5df8c --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/views/form/form_compiler.js @@ -0,0 +1,66 @@ +import { session } from '@web/session'; +import { patch } from '@web/core/utils/patch'; +import { append, createElement, setAttributes } from '@web/core/utils/xml'; + +import {FormCompiler} from '@web/views/form/form_compiler'; + +patch(FormCompiler.prototype, { + compile(node, params) { + const res = super.compile(node, params); + const chatterContainerHookXml = res.querySelector( + '.o_form_renderer > .o-mail-Form-chatter' + ); + if (!chatterContainerHookXml) { + return res; + } + setAttributes(chatterContainerHookXml, { + 't-ref': 'chatterContainer', + }); + if (session.chatter_position === 'bottom') { + const formSheetBgXml = res.querySelector('.o_form_sheet_bg'); + if (!chatterContainerHookXml || !formSheetBgXml?.parentNode) { + return res; + } + const webClientViewAttachmentViewHookXml = res.querySelector( + '.o_attachment_preview' + ); + const chatterContainerXml = chatterContainerHookXml.querySelector( + "t[t-component='__comp__.mailComponents.Chatter']" + ); + const sheetBgChatterContainerHookXml = chatterContainerHookXml.cloneNode(true); + const sheetBgChatterContainerXml = sheetBgChatterContainerHookXml.querySelector( + "t[t-component='__comp__.mailComponents.Chatter']" + ); + sheetBgChatterContainerHookXml.classList.add('o-isInFormSheetBg', 'w-auto'); + append(formSheetBgXml, sheetBgChatterContainerHookXml); + setAttributes(sheetBgChatterContainerXml, { + isInFormSheetBg: 'true', + isChatterAside: 'false', + }); + setAttributes(chatterContainerXml, { + isInFormSheetBg: 'true', + isChatterAside: 'false', + }); + setAttributes(chatterContainerHookXml, { + 't-if': 'false', + }); + if (webClientViewAttachmentViewHookXml) { + setAttributes(webClientViewAttachmentViewHookXml, { + 't-if': 'false', + }); + } + } else { + setAttributes(chatterContainerHookXml, { + 't-att-style': '__comp__.chatterState.width ? `width: ${__comp__.chatterState.width}px;` : ""', + }); + const chatterContainerResizeHookXml = createElement('span'); + chatterContainerResizeHookXml.classList.add('mk_chatter_resize'); + setAttributes(chatterContainerResizeHookXml, { + 't-on-mousedown.stop.prevent': '__comp__.onStartChatterResize.bind(__comp__)', + 't-on-dblclick.stop.prevent': '__comp__.onDoubleClickChatterResize.bind(__comp__)', + }); + append(chatterContainerHookXml, chatterContainerResizeHookXml); + } + return res; + }, +}); diff --git a/third_party_addons/muk_web_chatter/static/src/views/form/form_renderer.js b/third_party_addons/muk_web_chatter/static/src/views/form/form_renderer.js new file mode 100644 index 000000000..9af799aaa --- /dev/null +++ b/third_party_addons/muk_web_chatter/static/src/views/form/form_renderer.js @@ -0,0 +1,56 @@ +import { useState, useRef } from '@odoo/owl'; +import { patch } from '@web/core/utils/patch'; +import { browser } from "@web/core/browser/browser"; + +import { FormRenderer } from '@web/views/form/form_renderer'; + +patch(FormRenderer.prototype, { + setup() { + super.setup(); + this.chatterState = useState({ + width: browser.localStorage.getItem('muk_web_chatter.width'), + }); + this.chatterContainer = useRef('chatterContainer'); + }, + onStartChatterResize(ev) { + if (ev.button !== 0) { + return; + } + const initialX = ev.pageX; + const chatterElement = this.chatterContainer.el; + const initialWidth = chatterElement.offsetWidth; + const resizeStoppingEvents = [ + 'keydown', 'mousedown', 'mouseup' + ]; + const resizePanel = (ev) => { + ev.preventDefault(); + ev.stopPropagation(); + const newWidth = Math.min( + Math.max(50, initialWidth - (ev.pageX - initialX)), + Math.max(chatterElement.parentElement.offsetWidth - 250, 250) + ); + browser.localStorage.setItem('muk_web_chatter.width', newWidth); + this.chatterState.width = newWidth; + }; + const stopResize = (ev) => { + ev.preventDefault(); + ev.stopPropagation(); + if (ev.type === 'mousedown' && ev.button === 0) { + return; + } + document.removeEventListener('mousemove', resizePanel, true); + resizeStoppingEvents.forEach((stoppingEvent) => { + document.removeEventListener(stoppingEvent, stopResize, true); + }); + document.activeElement.blur(); + }; + document.addEventListener('mousemove', resizePanel, true); + resizeStoppingEvents.forEach((stoppingEvent) => { + document.addEventListener(stoppingEvent, stopResize, true); + }); + }, + onDoubleClickChatterResize(ev) { + browser.localStorage.removeItem('muk_web_chatter.width'); + this.chatterState.width = false; + }, +}); diff --git a/third_party_addons/muk_web_chatter/views/res_users.xml b/third_party_addons/muk_web_chatter/views/res_users.xml new file mode 100644 index 000000000..88b6197db --- /dev/null +++ b/third_party_addons/muk_web_chatter/views/res_users.xml @@ -0,0 +1,16 @@ + + + + + + res.users.form + res.users + + + + + + + + + diff --git a/third_party_addons/muk_web_colors/LICENSE b/third_party_addons/muk_web_colors/LICENSE new file mode 100644 index 000000000..0a041280b --- /dev/null +++ b/third_party_addons/muk_web_colors/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/third_party_addons/muk_web_colors/__init__.py b/third_party_addons/muk_web_colors/__init__.py new file mode 100644 index 000000000..d71f6b120 --- /dev/null +++ b/third_party_addons/muk_web_colors/__init__.py @@ -0,0 +1,6 @@ +from . import models + + +def _uninstall_cleanup(env): + env['res.config.settings']._reset_light_color_assets() + env['res.config.settings']._reset_dark_color_assets() diff --git a/third_party_addons/muk_web_colors/__manifest__.py b/third_party_addons/muk_web_colors/__manifest__.py new file mode 100644 index 000000000..925425aa5 --- /dev/null +++ b/third_party_addons/muk_web_colors/__manifest__.py @@ -0,0 +1,48 @@ +{ + 'name': 'MuK Colors', + 'summary': 'Customize your Odoo colors', + 'description': ''' + This module gives you options to customize the theme colors. + ''', + 'version': '18.0.1.0.6', + 'category': 'Tools/UI', + 'license': 'LGPL-3', + 'author': 'MuK IT', + 'website': 'http://www.mukit.at', + 'live_test_url': 'https://my.mukit.at/r/f6m', + 'contributors': [ + 'Mathias Markl ', + ], + 'depends': [ + 'base_setup', + 'web_editor', + ], + 'data': [ + 'templates/webclient.xml', + 'views/res_config_settings.xml', + ], + 'assets': { + 'web._assets_primary_variables': [ + ('prepend', 'muk_web_colors/static/src/scss/colors.scss'), + ( + 'before', + 'muk_web_colors/static/src/scss/colors.scss', + 'muk_web_colors/static/src/scss/colors_light.scss' + ), + ], + 'web.assets_web_dark': [ + ( + 'after', + 'muk_web_colors/static/src/scss/colors.scss', + 'muk_web_colors/static/src/scss/colors_dark.scss' + ), + ], + }, + 'images': [ + 'static/description/banner.png', + ], + 'installable': True, + 'application': False, + 'auto_install': False, + 'uninstall_hook': '_uninstall_cleanup', +} diff --git a/third_party_addons/muk_web_colors/doc/changelog.rst b/third_party_addons/muk_web_colors/doc/changelog.rst new file mode 100644 index 000000000..4d9690ede --- /dev/null +++ b/third_party_addons/muk_web_colors/doc/changelog.rst @@ -0,0 +1,4 @@ +`1.0.0` +------- + +- Initial Release diff --git a/third_party_addons/muk_web_colors/doc/index.rst b/third_party_addons/muk_web_colors/doc/index.rst new file mode 100644 index 000000000..fe2d4ba2e --- /dev/null +++ b/third_party_addons/muk_web_colors/doc/index.rst @@ -0,0 +1,57 @@ +========== +MuK Colors +========== + +This module gives you options to customize the color schema of your Odoo system. +You have options to edit the brand and the primary color as well as the context +colors (info, success, warning, danger). The options are also available for the +dark mode on Odoo Enterprise. + +Installation +============ + +To install this module, you need to: + +Download the module and add it to your Odoo addons folder. Afterward, log on to +your Odoo server and go to the Apps menu. Trigger the debug mode and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Upgrade +============ + +To upgrade this module, you need to: + +Download the module and add it to your Odoo addons folder. Restart the server +and log on to your Odoo server. Select the Apps menu and upgrade the module by +clicking on the upgrade button. + +Configuration +============= + +The colors can be set in the general settings using a color picker. + +Usage +============= + +Once the colors a set the system will adapt for all users. + +Credits +======= + +Contributors +------------ + +* Mathias Markl + +Author & Maintainer +------------------- + +This module is maintained by the `MuK IT GmbH `_. + +MuK IT is an Austrian company specialized in customizing and extending Odoo. +We develop custom solutions for your individual needs to help you focus on +your strength and expertise to grow your business. + +If you want to get in touch please contact us via mail +(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/third_party_addons/muk_web_colors/i18n/de.po b/third_party_addons/muk_web_colors/i18n/de.po new file mode 100644 index 000000000..2cfa394b3 --- /dev/null +++ b/third_party_addons/muk_web_colors/i18n/de.po @@ -0,0 +1,151 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * muk_web_colors +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-06 14:36+0000\n" +"PO-Revision-Date: 2024-11-06 14:36+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: muk_web_colors +#: model:ir.model,name:muk_web_colors.model_web_editor_assets +msgid "Assets Utils" +msgstr "" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Brand" +msgstr "Marke" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_brand_dark +msgid "Brand Dark Color" +msgstr "Marke dunkle Farbe" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_brand_light +msgid "Brand Light Color" +msgstr "Marke helle Farbe" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Branding" +msgstr "Branding" + +#. module: muk_web_colors +#: model:ir.model,name:muk_web_colors.model_res_config_settings +msgid "Config Settings" +msgstr "Konfigurationseinstellungen" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Customize the look and feel of the dark mode" +msgstr "Passen Sie Aussehen und Handhabung des dunklen Modus an" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Customize the look and feel of the light mode" +msgstr "Passen Sie Aussehen und Handhabung des hellen Modus an" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Danger" +msgstr "Gefahr" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_danger_dark +msgid "Danger Dark Color" +msgstr "Gefahr dunkle Farbe" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_danger_light +msgid "Danger Light Color" +msgstr "Gefahr helle Farbe" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Dark Mode Colors" +msgstr "Farben dunkler Modus" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Info" +msgstr "Information" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_info_dark +msgid "Info Dark Color" +msgstr "Information dunkle Farbe" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_info_light +msgid "Info Light Color" +msgstr "Information helle Farbe" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Light Mode Colors" +msgstr "Farben heller Modus" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Primary" +msgstr "Primär" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_primary_dark +msgid "Primary Dark Color" +msgstr "Primäre dunkle Farbe" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_primary_light +msgid "Primary Light Color" +msgstr "Primäre helle Farbe" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Reset Dark Colors" +msgstr "dunkle Farbe zurücksetzen" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Reset Light Colors" +msgstr "helle Farbe zurücksetzen" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Success" +msgstr "Erfolg" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_success_dark +msgid "Success Dark Color" +msgstr "Erfolg dunkle Farbe" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_success_light +msgid "Success Light Color" +msgstr "Erfolg helle Farbe" + +#. module: muk_web_colors +#: model_terms:ir.ui.view,arch_db:muk_web_colors.view_res_config_settings_form +msgid "Warning" +msgstr "Warnung" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_warning_dark +msgid "Warning Dark Color" +msgstr "Warnung dunkle Farbe" + +#. module: muk_web_colors +#: model:ir.model.fields,field_description:muk_web_colors.field_res_config_settings__color_warning_light +msgid "Warning Light Color" +msgstr "Warnung helle Farbe" \ No newline at end of file diff --git a/third_party_addons/muk_web_colors/models/__init__.py b/third_party_addons/muk_web_colors/models/__init__.py new file mode 100644 index 000000000..4c9f7ffbc --- /dev/null +++ b/third_party_addons/muk_web_colors/models/__init__.py @@ -0,0 +1,2 @@ +from . import res_config_settings +from . import web_editor_assets diff --git a/third_party_addons/muk_web_colors/models/res_config_settings.py b/third_party_addons/muk_web_colors/models/res_config_settings.py new file mode 100644 index 000000000..390f01aa1 --- /dev/null +++ b/third_party_addons/muk_web_colors/models/res_config_settings.py @@ -0,0 +1,213 @@ +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + + _inherit = 'res.config.settings' + + # ---------------------------------------------------------- + # Properties + # ---------------------------------------------------------- + + @property + def COLOR_FIELDS(self): + return [ + 'color_brand', + 'color_primary', + 'color_success', + 'color_info', + 'color_warning', + 'color_danger', + ] + + @property + def COLOR_ASSET_LIGHT_URL(self): + return '/muk_web_colors/static/src/scss/colors_light.scss' + + @property + def COLOR_BUNDLE_LIGHT_NAME(self): + return 'web._assets_primary_variables' + + @property + def COLOR_ASSET_DARK_URL(self): + return '/muk_web_colors/static/src/scss/colors_dark.scss' + + @property + def COLOR_BUNDLE_DARK_NAME(self): + return 'web.assets_web_dark' + + #---------------------------------------------------------- + # Fields Light Mode + #---------------------------------------------------------- + + color_brand_light = fields.Char( + string='Brand Light Color' + ) + + color_primary_light = fields.Char( + string='Primary Light Color' + ) + + color_success_light = fields.Char( + string='Success Light Color' + ) + + color_info_light = fields.Char( + string='Info Light Color' + ) + + color_warning_light = fields.Char( + string='Warning Light Color' + ) + + color_danger_light = fields.Char( + string='Danger Light Color' + ) + + #---------------------------------------------------------- + # Fields Dark Mode + #---------------------------------------------------------- + + color_brand_dark = fields.Char( + string='Brand Dark Color' + ) + + color_primary_dark = fields.Char( + string='Primary Dark Color' + ) + + color_success_dark = fields.Char( + string='Success Dark Color' + ) + + color_info_dark = fields.Char( + string='Info Dark Color' + ) + + color_warning_dark = fields.Char( + string='Warning Dark Color' + ) + + color_danger_dark = fields.Char( + string='Danger Dark Color' + ) + + #---------------------------------------------------------- + # Helper + #---------------------------------------------------------- + + def _get_light_color_values(self): + return self.env['web_editor.assets'].get_color_variables_values( + self.COLOR_ASSET_LIGHT_URL, + self.COLOR_BUNDLE_LIGHT_NAME, + self.COLOR_FIELDS + ) + + def _get_dark_color_values(self): + return self.env['web_editor.assets'].get_color_variables_values( + self.COLOR_ASSET_DARK_URL, + self.COLOR_BUNDLE_DARK_NAME, + self.COLOR_FIELDS + ) + + def _set_light_color_values(self, values): + colors = self._get_light_color_values() + for var, value in colors.items(): + values[f'{var}_light'] = value + return values + + def _set_dark_color_values(self, values): + colors = self._get_dark_color_values() + for var, value in colors.items(): + values[f'{var}_dark'] = value + return values + + def _detect_light_color_change(self): + colors = self._get_light_color_values() + return any( + self[f'{var}_light'] != val + for var, val in colors.items() + ) + + def _detect_dark_color_change(self): + colors = self._get_dark_color_values() + return any( + self[f'{var}_dark'] != val + for var, val in colors.items() + ) + + def _replace_light_color_values(self): + variables = [ + { + 'name': field, + 'value': self[f'{field}_light'] + } + for field in self.COLOR_FIELDS + ] + return self.env['web_editor.assets'].replace_color_variables_values( + self.COLOR_ASSET_LIGHT_URL, + self.COLOR_BUNDLE_LIGHT_NAME, + variables + ) + + def _replace_dark_color_values(self): + variables = [ + { + 'name': field, + 'value': self[f'{field}_dark'] + } + for field in self.COLOR_FIELDS + ] + return self.env['web_editor.assets'].replace_color_variables_values( + self.COLOR_ASSET_DARK_URL, + self.COLOR_BUNDLE_DARK_NAME, + variables + ) + + def _reset_light_color_assets(self): + self.env['web_editor.assets'].reset_color_asset( + self.COLOR_ASSET_LIGHT_URL, + self.COLOR_BUNDLE_LIGHT_NAME, + ) + + def _reset_dark_color_assets(self): + self.env['web_editor.assets'].reset_asset( + self.COLOR_ASSET_DARK_URL, + self.COLOR_BUNDLE_DARK_NAME, + ) + + #---------------------------------------------------------- + # Action + #---------------------------------------------------------- + + def action_reset_light_color_assets(self): + self._reset_light_color_assets() + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + + def action_reset_dark_color_assets(self): + self._reset_dark_color_assets() + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + + #---------------------------------------------------------- + # Functions + #---------------------------------------------------------- + + def get_values(self): + res = super().get_values() + res = self._set_light_color_values(res) + res = self._set_dark_color_values(res) + return res + + def set_values(self): + res = super().set_values() + if self._detect_light_color_change(): + self._replace_light_color_values() + if self._detect_dark_color_change(): + self._replace_dark_color_values() + return res diff --git a/third_party_addons/muk_web_colors/models/web_editor_assets.py b/third_party_addons/muk_web_colors/models/web_editor_assets.py new file mode 100644 index 000000000..ef2817479 --- /dev/null +++ b/third_party_addons/muk_web_colors/models/web_editor_assets.py @@ -0,0 +1,121 @@ +import re +import base64 + +from odoo import models, fields, api +from odoo.tools import misc + +from odoo.addons.base.models.assetsbundle import EXTENSIONS + + +class ScssEditor(models.AbstractModel): + + _inherit = 'web_editor.assets' + + # ---------------------------------------------------------- + # Helper + # ---------------------------------------------------------- + + @api.model + def _get_colors_attachment(self, custom_url): + return self.env['ir.attachment'].search([ + ('url', '=', custom_url) + ]) + + @api.model + def _get_colors_asset(self, custom_url): + return self.env['ir.asset'].search([ + ('path', 'like', custom_url) + ]) + + @api.model + def _get_colors_from_url(self, url, bundle): + custom_url = self._make_custom_asset_url(url, bundle) + url_info = self._get_data_from_url(custom_url) + if url_info['customized']: + attachment = self._get_colors_attachment( + custom_url + ) + if attachment: + return base64.b64decode(attachment.datas) + with misc.file_open(url.strip('/'), 'rb', filter_ext=EXTENSIONS) as f: + return f.read() + + def _get_color_variable(self, content, variable): + value = re.search(fr'\$mk_{variable}\:?\s(.*?);', content) + return value and value.group(1) + + def _get_color_variables(self, content, variables): + return { + var: self._get_color_variable(content, var) + for var in variables + } + + def _replace_color_variables(self, content, variables): + for variable in variables: + content = re.sub( + fr'{variable["name"]}\:?\s(.*?);', + f'{variable["name"]}: {variable["value"]};', + content + ) + return content + + @api.model + def _save_color_asset(self, url, bundle, content): + custom_url = self._make_custom_asset_url(url, bundle) + asset_url = url[1:] if url.startswith(('/', '\\')) else url + datas = base64.b64encode((content or "\n").encode("utf-8")) + custom_attachment = self._get_colors_attachment( + custom_url + ) + if custom_attachment: + custom_attachment.write({"datas": datas}) + self.env.registry.clear_cache('assets') + else: + attachment_values = { + 'name': url.split("/")[-1], + 'type': "binary", + 'mimetype': 'text/scss', + 'datas': datas, + 'url': custom_url, + } + asset_values = { + 'path': custom_url, + 'target': url, + 'directive': 'replace', + } + target_asset = self._get_colors_asset( + asset_url + ) + if target_asset: + asset_values['name'] = '%s override' % target_asset.name + asset_values['bundle'] = target_asset.bundle + asset_values['sequence'] = target_asset.sequence + else: + asset_values['name'] = '%s: replace %s' % ( + bundle, custom_url.split('/')[-1] + ) + asset_values['bundle'] = self.env['ir.asset']._get_related_bundle( + url, bundle + ) + self.env['ir.attachment'].create(attachment_values) + self.env['ir.asset'].create(asset_values) + + # ---------------------------------------------------------- + # Functions + # ---------------------------------------------------------- + + def get_color_variables_values(self, url, bundle, variables): + content = self._get_colors_from_url(url, bundle) + return self._get_color_variables( + content.decode('utf-8'), variables + ) + + def replace_color_variables_values(self, url, bundle, variables): + original = self._get_colors_from_url(url, bundle).decode('utf-8') + content = self._replace_color_variables(original, variables) + self._save_color_asset(url, bundle, content) + + def reset_color_asset(self, url, bundle): + custom_url = self._make_custom_asset_url(url, bundle) + self._get_colors_attachment(custom_url).unlink() + self._get_colors_asset(custom_url).unlink() diff --git a/third_party_addons/muk_web_colors/static/description/banner.png b/third_party_addons/muk_web_colors/static/description/banner.png new file mode 100644 index 000000000..b08a7f7cb Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/banner.png differ diff --git a/third_party_addons/muk_web_colors/static/description/icon.png b/third_party_addons/muk_web_colors/static/description/icon.png new file mode 100644 index 000000000..44302d686 Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/icon.png differ diff --git a/third_party_addons/muk_web_colors/static/description/icon.svg b/third_party_addons/muk_web_colors/static/description/icon.svg new file mode 100644 index 000000000..4a324b91d --- /dev/null +++ b/third_party_addons/muk_web_colors/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/third_party_addons/muk_web_colors/static/description/index.html b/third_party_addons/muk_web_colors/static/description/index.html new file mode 100644 index 000000000..7fab894e8 --- /dev/null +++ b/third_party_addons/muk_web_colors/static/description/index.html @@ -0,0 +1,152 @@ +
+
+

MuK Colors

+

Customize your Odoo colors

+ +

MuK IT GmbH - www.mukit.at

+
+ + Community + + + Enterprise + +
+
+ +
+
+
+ +
+
+
+

Overview

+

+ This module gives you options to customize the color schema of your Odoo system. + You have options to edit the brand and the primary color as well as the context + colors (info, success, warning, danger). +

+
+
+
+ +
+
+
+

Dark Mode

+

+ With the Enterprise version, the colours for the dark mode can be changed in + the same way as for the light mode. +

+
+ +
+
+
+
+ +
+
+

+ Want more? +

+

+ Are you having troubles with your Odoo integration? Or do you feel + your system lacks of essential features?
If your answer is YES + to one of the above questions, feel free to contact us at anytime + with your inquiry.
We are looking forward to discuss your + needs and plan the next steps with you.
+

+
+ +
+ +
+
+

Our Services

+
+
+
+
+ +
+

+ Odoo
Development +

+
+
+
+
+
+ +
+

+ Odoo
Integration +

+
+
+
+
+
+ +
+

+ Odoo
Infrastructure +

+
+
+
+
+
+ +
+

+ Odoo
Training +

+
+
+
+
+
+ +
+

+ Odoo
Support +

+
+
+
+
+
diff --git a/third_party_addons/muk_web_colors/static/description/logo.png b/third_party_addons/muk_web_colors/static/description/logo.png new file mode 100644 index 000000000..9427ce33e Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/logo.png differ diff --git a/third_party_addons/muk_web_colors/static/description/screenshot.png b/third_party_addons/muk_web_colors/static/description/screenshot.png new file mode 100644 index 000000000..3f397a114 Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/screenshot.png differ diff --git a/third_party_addons/muk_web_colors/static/description/screenshot_dark.png b/third_party_addons/muk_web_colors/static/description/screenshot_dark.png new file mode 100644 index 000000000..689e149d6 Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/screenshot_dark.png differ diff --git a/third_party_addons/muk_web_colors/static/description/service_development.png b/third_party_addons/muk_web_colors/static/description/service_development.png new file mode 100644 index 000000000..d64b66bda Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/service_development.png differ diff --git a/third_party_addons/muk_web_colors/static/description/service_infrastructure.png b/third_party_addons/muk_web_colors/static/description/service_infrastructure.png new file mode 100644 index 000000000..b899a3104 Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/service_infrastructure.png differ diff --git a/third_party_addons/muk_web_colors/static/description/service_integration.png b/third_party_addons/muk_web_colors/static/description/service_integration.png new file mode 100644 index 000000000..76c5e80f4 Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/service_integration.png differ diff --git a/third_party_addons/muk_web_colors/static/description/service_support.png b/third_party_addons/muk_web_colors/static/description/service_support.png new file mode 100644 index 000000000..4c530fafd Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/service_support.png differ diff --git a/third_party_addons/muk_web_colors/static/description/service_training.png b/third_party_addons/muk_web_colors/static/description/service_training.png new file mode 100644 index 000000000..19ea76e63 Binary files /dev/null and b/third_party_addons/muk_web_colors/static/description/service_training.png differ diff --git a/third_party_addons/muk_web_colors/static/src/scss/colors.scss b/third_party_addons/muk_web_colors/static/src/scss/colors.scss new file mode 100644 index 000000000..8022f8b5c --- /dev/null +++ b/third_party_addons/muk_web_colors/static/src/scss/colors.scss @@ -0,0 +1 @@ +// Color Assets \ No newline at end of file diff --git a/third_party_addons/muk_web_colors/static/src/scss/colors_dark.scss b/third_party_addons/muk_web_colors/static/src/scss/colors_dark.scss new file mode 100644 index 000000000..6a323c507 --- /dev/null +++ b/third_party_addons/muk_web_colors/static/src/scss/colors_dark.scss @@ -0,0 +1,31 @@ +// Colors + +$mk_color_brand: #243742; +$mk_color_primary: #5D8DA8; + +$mk_color_success: #1DC959; +$mk_color_info: #6AB5FB; +$mk_color_warning: #FBB56A; +$mk_color_danger: #FF5757; + +// Override + +$o-community-color: $mk-color-brand; +$o-enterprise-color: $mk-color-brand; +$o-enterprise-action-color: $mk-color-primary; + +$o-brand-odoo: $mk-color-brand; +$o-brand-primary: $mk-color-primary; + +$o-success: $mk-color-success; +$o-info: $mk-color-info; +$o-warning: $mk-color-warning; +$o-danger: $mk-color-danger; + +$o-theme-text-colors: ( + "primary": $mk-color-brand, + "success": $o-success, + "info": $o-info, + "warning": $o-warning, + "danger": $o-danger, +); diff --git a/third_party_addons/muk_web_colors/static/src/scss/colors_light.scss b/third_party_addons/muk_web_colors/static/src/scss/colors_light.scss new file mode 100644 index 000000000..771a75b0d --- /dev/null +++ b/third_party_addons/muk_web_colors/static/src/scss/colors_light.scss @@ -0,0 +1,31 @@ +// Colors + +$mk_color_brand: #243742; +$mk_color_primary: #5D8DA8; + +$mk_color_success: #28A745; +$mk_color_info: #17A2B8; +$mk_color_warning: #FFAC00; +$mk_color_danger: #DC3545; + +// Override + +$o-community-color: $mk-color-brand; +$o-enterprise-color: $mk-color-brand; +$o-enterprise-action-color: $mk-color-primary; + +$o-brand-odoo: $mk-color-brand; +$o-brand-primary: $mk-color-primary; + +$o-success: $mk-color-success; +$o-info: $mk-color-info; +$o-warning: $mk-color-warning; +$o-danger: $mk-color-danger; + +$o-theme-text-colors: ( + "primary": $mk-color-brand, + "success": $o-success, + "info": $o-info, + "warning": $o-warning, + "danger": $o-danger, +); diff --git a/third_party_addons/muk_web_colors/templates/webclient.xml b/third_party_addons/muk_web_colors/templates/webclient.xml new file mode 100644 index 000000000..7664a7a83 --- /dev/null +++ b/third_party_addons/muk_web_colors/templates/webclient.xml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/third_party_addons/muk_web_colors/views/res_config_settings.xml b/third_party_addons/muk_web_colors/views/res_config_settings.xml new file mode 100644 index 000000000..20b9c280b --- /dev/null +++ b/third_party_addons/muk_web_colors/views/res_config_settings.xml @@ -0,0 +1,83 @@ + + + + + + res.config.settings.form + res.config.settings + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + diff --git a/third_party_addons/muk_web_dialog/views/res_users.xml b/third_party_addons/muk_web_dialog/views/res_users.xml new file mode 100644 index 000000000..eb6437a44 --- /dev/null +++ b/third_party_addons/muk_web_dialog/views/res_users.xml @@ -0,0 +1,16 @@ + + + + + + res.users.form + res.users + + + + + + + + + diff --git a/third_party_addons/muk_web_theme/LICENSE b/third_party_addons/muk_web_theme/LICENSE new file mode 100644 index 000000000..0a041280b --- /dev/null +++ b/third_party_addons/muk_web_theme/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/third_party_addons/muk_web_theme/__init__.py b/third_party_addons/muk_web_theme/__init__.py new file mode 100644 index 000000000..5e57ea26d --- /dev/null +++ b/third_party_addons/muk_web_theme/__init__.py @@ -0,0 +1,21 @@ +from . import models + +import base64 + +from odoo.tools import file_open + + +def _setup_module(env): + if env.ref('base.main_company', False): + with file_open('web/static/img/favicon.ico', 'rb') as file: + env.ref('base.main_company').write({ + 'favicon': base64.b64encode(file.read()) + }) + with file_open('muk_web_theme/static/src/img/background.png', 'rb') as file: + env.ref('base.main_company').write({ + 'background_image': base64.b64encode(file.read()) + }) + + +def _uninstall_cleanup(env): + env['res.config.settings']._reset_theme_color_assets() diff --git a/third_party_addons/muk_web_theme/__manifest__.py b/third_party_addons/muk_web_theme/__manifest__.py new file mode 100644 index 000000000..b03c99e9d --- /dev/null +++ b/third_party_addons/muk_web_theme/__manifest__.py @@ -0,0 +1,59 @@ +{ + 'name': 'MuK Backend Theme', + 'summary': 'Odoo Community Backend Theme', + 'description': ''' + This module offers a mobile compatible design for Odoo Community. + Furthermore it allows the user to define some design preferences. + ''', + 'version': '18.0.1.2.3', + 'category': 'Themes/Backend', + 'license': 'LGPL-3', + 'author': 'MuK IT', + 'website': 'http://www.mukit.at', + 'live_test_url': 'https://my.mukit.at/r/f6m', + 'contributors': [ + 'Mathias Markl ', + ], + 'depends': [ + 'muk_web_chatter', + 'muk_web_dialog', + 'muk_web_appsbar', + 'muk_web_colors', + ], + 'excludes': [ + 'web_enterprise', + ], + 'data': [ + 'templates/web_layout.xml', + 'views/res_config_settings.xml', + ], + 'assets': { + 'web._assets_primary_variables': [ + ( + 'after', + 'web/static/src/scss/primary_variables.scss', + 'muk_web_theme/static/src/scss/colors.scss' + ), + ( + 'after', + 'web/static/src/scss/primary_variables.scss', + 'muk_web_theme/static/src/scss/variables.scss' + ), + ], + 'web.assets_backend': [ + 'muk_web_theme/static/src/webclient/**/*.xml', + 'muk_web_theme/static/src/webclient/**/*.scss', + 'muk_web_theme/static/src/webclient/**/*.js', + 'muk_web_theme/static/src/views/**/*.scss', + ], + }, + 'images': [ + 'static/description/banner.png', + 'static/description/theme_screenshot.png' + ], + 'installable': True, + 'application': False, + 'auto_install': False, + 'post_init_hook': '_setup_module', + 'uninstall_hook': '_uninstall_cleanup', +} diff --git a/third_party_addons/muk_web_theme/doc/changelog.rst b/third_party_addons/muk_web_theme/doc/changelog.rst new file mode 100644 index 000000000..875824205 --- /dev/null +++ b/third_party_addons/muk_web_theme/doc/changelog.rst @@ -0,0 +1,14 @@ +`1.2.0` +------- + +- Add Dialog Module + +`1.1.0` +------- + +- Add Chatter Module + +`1.0.0` +------- + +- Initial Release diff --git a/third_party_addons/muk_web_theme/doc/index.rst b/third_party_addons/muk_web_theme/doc/index.rst new file mode 100644 index 000000000..9b888a895 --- /dev/null +++ b/third_party_addons/muk_web_theme/doc/index.rst @@ -0,0 +1,58 @@ +================= +MuK Backend Theme +================= + +This module offers a mobile compatible design for Odoo Community. Furthermore it +allows the user to define some design preferences. Each user can choose the size +of the sidebar. In addition, the background image of the app menu can be set +for each company. + +Installation +============ + +To install this module, you need to: + +Download the module and add it to your Odoo addons folder. Afterward, log on to +your Odoo server and go to the Apps menu. Trigger the debug mode and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Upgrade +============ + +To upgrade this module, you need to: + +Download the module and add it to your Odoo addons folder. Restart the server +and log on to your Odoo server. Select the Apps menu and upgrade the module by +clicking on the upgrade button. + +Configuration +============= + +To further customize the theme several settings are available in the general +settings page. + +Usage +============= + +After the module is installed, the design is adjusted accordingly. + +Credits +======= + +Contributors +------------ + +* Mathias Markl + +Author & Maintainer +------------------- + +This module is maintained by the `MuK IT GmbH `_. + +MuK IT is an Austrian company specialized in customizing and extending Odoo. +We develop custom solutions for your individual needs to help you focus on +your strength and expertise to grow your business. + +If you want to get in touch please contact us via mail +(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/third_party_addons/muk_web_theme/i18n/de.po b/third_party_addons/muk_web_theme/i18n/de.po new file mode 100644 index 000000000..e20038d39 --- /dev/null +++ b/third_party_addons/muk_web_theme/i18n/de.po @@ -0,0 +1,179 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * muk_web_theme +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-06 13:53+0000\n" +"PO-Revision-Date: 2024-11-06 13:53+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Apps Active" +msgstr "Aktive Apps" + +#. module: muk_web_theme +#: model:ir.model.fields,field_description:muk_web_theme.field_res_company__background_image +#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_background_image +msgid "Apps Menu Background Image" +msgstr "Hintergrundfarbe Appsmenü" + +#. module: muk_web_theme +#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appsmenu_text +msgid "Apps Menu Text Color" +msgstr "Textfarbe Appsmenü" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Apps Text" +msgstr "Appstext" + +#. module: muk_web_theme +#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appbar_active +msgid "AppsBar Active Color" +msgstr "Aktive Farbe Appsleiste" + +#. module: muk_web_theme +#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appbar_background +msgid "AppsBar Background Color" +msgstr "Hintergrundfarbe Appsleiste" + +#. module: muk_web_theme +#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_color_appbar_text +msgid "AppsBar Text Color" +msgstr "Textfarbe Appsleiste" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Backend Theme" +msgstr "Backend-Theme" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Background" +msgstr "Hintergrund" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Background Image" +msgstr "Hintergrundbild" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Brand" +msgstr "Marke" + +#. module: muk_web_theme +#: model:ir.model,name:muk_web_theme.model_res_company +msgid "Companies" +msgstr "Unternehmen" + +#. module: muk_web_theme +#: model:ir.model.fields,field_description:muk_web_theme.field_res_company__favicon +#: model:ir.model.fields,field_description:muk_web_theme.field_res_config_settings__theme_favicon +msgid "Company Favicon" +msgstr "Favicon Unternehmen" + +#. module: muk_web_theme +#: model:ir.model,name:muk_web_theme.model_res_config_settings +msgid "Config Settings" +msgstr "Konfigurationseinstellungen" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Context Colors" +msgstr "Kontext Farben" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Customize context colors of the system" +msgstr "Passen Sie die Kontextfarben des Systems an" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Customize the look and feel of the theme" +msgstr "Passen Sie das Erscheinungsbild des Themas an" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Danger" +msgstr "Gefahr" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Favicon" +msgstr "Favicon" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Favicon & Logo" +msgstr "Favicon & Logo" + +#. module: muk_web_theme +#: model:ir.model,name:muk_web_theme.model_ir_http +msgid "HTTP Routing" +msgstr "HTTP-Routing" + +#. module: muk_web_theme +#. odoo-javascript +#: code:addons/muk_web_theme/static/src/webclient/navbar/navbar.xml:0 +msgid "Home Menu" +msgstr "Home-Menü" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Info" +msgstr "Info" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Logo" +msgstr "Logo" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Menu Text" +msgstr "Menü Text" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Primary" +msgstr "Primär" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Reset Theme Colors" +msgstr "Farben des Themas zurücksetzen" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Set the background image for the apps menu" +msgstr "Legen Sie das Hintergrundbild für das Apps-Menü fest" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Set your own favicon and logo for the appsbar" +msgstr "Legen Sie ihr eigenes Favicon und Logo für die Appsleiste fest" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Success" +msgstr "Erfolg" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Theme Colors" +msgstr "Thema Farben" + +#. module: muk_web_theme +#: model_terms:ir.ui.view,arch_db:muk_web_theme.view_res_config_settings_colors_form +msgid "Warning" +msgstr "Warnung" \ No newline at end of file diff --git a/third_party_addons/muk_web_theme/models/__init__.py b/third_party_addons/muk_web_theme/models/__init__.py new file mode 100644 index 000000000..c674f0db6 --- /dev/null +++ b/third_party_addons/muk_web_theme/models/__init__.py @@ -0,0 +1,3 @@ +from . import ir_http +from . import res_company +from . import res_config_settings diff --git a/third_party_addons/muk_web_theme/models/ir_http.py b/third_party_addons/muk_web_theme/models/ir_http.py new file mode 100644 index 000000000..1ba76c27a --- /dev/null +++ b/third_party_addons/muk_web_theme/models/ir_http.py @@ -0,0 +1,20 @@ +from odoo import models +from odoo.http import request + + +class IrHttp(models.AbstractModel): + + _inherit = "ir.http" + + #---------------------------------------------------------- + # Functions + #---------------------------------------------------------- + + def session_info(self): + result = super(IrHttp, self).session_info() + if request.env.user._is_internal(): + for company in request.env.user.company_ids.with_context(bin_size=True): + result['user_companies']['allowed_companies'][company.id].update({ + 'has_background_image': bool(company.background_image), + }) + return result diff --git a/third_party_addons/muk_web_theme/models/res_company.py b/third_party_addons/muk_web_theme/models/res_company.py new file mode 100644 index 000000000..bfaefbdc0 --- /dev/null +++ b/third_party_addons/muk_web_theme/models/res_company.py @@ -0,0 +1,20 @@ +from odoo import models, fields + + +class ResCompany(models.Model): + + _inherit = 'res.company' + + #---------------------------------------------------------- + # Fields + #---------------------------------------------------------- + + favicon = fields.Binary( + string="Company Favicon", + attachment=True + ) + + background_image = fields.Binary( + string='Apps Menu Background Image', + attachment=True + ) diff --git a/third_party_addons/muk_web_theme/models/res_config_settings.py b/third_party_addons/muk_web_theme/models/res_config_settings.py new file mode 100644 index 000000000..aad5ccdf7 --- /dev/null +++ b/third_party_addons/muk_web_theme/models/res_config_settings.py @@ -0,0 +1,125 @@ +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + + _inherit = 'res.config.settings' + + @property + def THEME_COLOR_FIELDS(self): + return [ + 'color_appsmenu_text', + 'color_appbar_text', + 'color_appbar_active', + 'color_appbar_background', + ] + + @property + def COLOR_ASSET_THEME_URL(self): + return '/muk_web_theme/static/src/scss/colors.scss' + + @property + def COLOR_BUNDLE_THEME_NAME(self): + return 'web._assets_primary_variables' + + #---------------------------------------------------------- + # Fields + #---------------------------------------------------------- + + theme_favicon = fields.Binary( + related='company_id.favicon', + readonly=False + ) + + theme_background_image = fields.Binary( + related='company_id.background_image', + readonly=False + ) + + theme_color_appsmenu_text = fields.Char( + string='Apps Menu Text Color' + ) + + theme_color_appbar_text = fields.Char( + string='AppsBar Text Color' + ) + + theme_color_appbar_active = fields.Char( + string='AppsBar Active Color' + ) + + theme_color_appbar_background = fields.Char( + string='AppsBar Background Color' + ) + + #---------------------------------------------------------- + # Helper + #---------------------------------------------------------- + + def _get_theme_color_values(self): + return self.env['web_editor.assets'].get_color_variables_values( + self.COLOR_ASSET_THEME_URL, + self.COLOR_BUNDLE_THEME_NAME, + self.THEME_COLOR_FIELDS + ) + + def _set_theme_color_values(self, values): + colors = self._get_theme_color_values() + for var, value in colors.items(): + values[f'theme_{var}'] = value + return values + + def _detect_theme_color_change(self): + colors = self._get_theme_color_values() + return any( + self[f'theme_{var}'] != val + for var, val in colors.items() + ) + + def _replace_theme_color_values(self): + variables = [ + { + 'name': field, + 'value': self[f'theme_{field}'] + } + for field in self.THEME_COLOR_FIELDS + ] + return self.env['web_editor.assets'].replace_color_variables_values( + self.COLOR_ASSET_THEME_URL, + self.COLOR_BUNDLE_THEME_NAME, + variables + ) + + def _reset_theme_color_assets(self): + self.env['web_editor.assets'].reset_asset( + self.COLOR_ASSET_THEME_URL, + self.COLOR_BUNDLE_THEME_NAME, + ) + + #---------------------------------------------------------- + # Action + #---------------------------------------------------------- + + def action_reset_theme_color_assets(self): + self._reset_light_color_assets() + self._reset_dark_color_assets() + self._reset_theme_color_assets() + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + + #---------------------------------------------------------- + # Functions + #---------------------------------------------------------- + + def get_values(self): + res = super().get_values() + res = self._set_theme_color_values(res) + return res + + def set_values(self): + res = super().set_values() + if self._detect_theme_color_change(): + self._replace_theme_color_values() + return res diff --git a/third_party_addons/muk_web_theme/static/description/banner.png b/third_party_addons/muk_web_theme/static/description/banner.png new file mode 100644 index 000000000..d8a7f07af Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/banner.png differ diff --git a/third_party_addons/muk_web_theme/static/description/icon.png b/third_party_addons/muk_web_theme/static/description/icon.png new file mode 100644 index 000000000..c75003168 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/icon.png differ diff --git a/third_party_addons/muk_web_theme/static/description/icon.svg b/third_party_addons/muk_web_theme/static/description/icon.svg new file mode 100644 index 000000000..f6a553ad2 --- /dev/null +++ b/third_party_addons/muk_web_theme/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/third_party_addons/muk_web_theme/static/description/index.html b/third_party_addons/muk_web_theme/static/description/index.html new file mode 100644 index 000000000..86686a1f1 --- /dev/null +++ b/third_party_addons/muk_web_theme/static/description/index.html @@ -0,0 +1,223 @@ +
+
+

MuK Backend Theme

+

Odoo Community Backend Theme

+ +

MuK IT GmbH - www.mukit.at

+
+ + Community + + + Enterprise + +
+
+ +
+
+
+ +
+
+
+

Overview

+

+ This module offers a mobile compatible design for Odoo Community. Furthermore it + allows the user to define some design preferences. Each user can choose the size + of the sidebar. In addition, the background image of the app menu can be set + for each company. +

+
+
+
+ +
+
+
+

Desktop Interface

+

+ The theme adds a new apps menu. This can also be opened via the menu icon. Instead + of a list, the apps are now displayed in a fullscreen popover. If you start tapping + while you are on the menu, the menu search opens automatically. +

+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+

Mobile Interface

+

+ The mobile view has also been improved. Here too, the menu view is now a list with + corresponding icons and the chat buttons are smaller in the mobile view to optimise + the use of space. +

+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+

Fully Customizable

+

+ In addition to the colours, the favicon and the appsbar logo can also be set in + the general settings. Each user also has the option of adjusting the relevant + settings in their user profile. +

+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+

+ Want more? +

+

+ Are you having troubles with your Odoo integration? Or do you feel + your system lacks of essential features?
If your answer is YES + to one of the above questions, feel free to contact us at anytime + with your inquiry.
We are looking forward to discuss your + needs and plan the next steps with you.
+

+
+ +
+ +
+
+

Our Services

+
+
+
+
+ +
+

+ Odoo
Development +

+
+
+
+
+
+ +
+

+ Odoo
Integration +

+
+
+
+
+
+ +
+

+ Odoo
Infrastructure +

+
+
+
+
+
+ +
+

+ Odoo
Training +

+
+
+
+
+
+ +
+

+ Odoo
Support +

+
+
+
+
+
diff --git a/third_party_addons/muk_web_theme/static/description/logo.png b/third_party_addons/muk_web_theme/static/description/logo.png new file mode 100644 index 000000000..9427ce33e Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/logo.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot.png b/third_party_addons/muk_web_theme/static/description/screenshot.png new file mode 100644 index 000000000..8e7a7c76c Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_apps.png b/third_party_addons/muk_web_theme/static/description/screenshot_apps.png new file mode 100644 index 000000000..d7b4e116b Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_apps.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_chatter.png b/third_party_addons/muk_web_theme/static/description/screenshot_chatter.png new file mode 100644 index 000000000..c4546f82d Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_chatter.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_customize.png b/third_party_addons/muk_web_theme/static/description/screenshot_customize.png new file mode 100644 index 000000000..9ad1f2ee8 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_customize.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_mobile_apps.png b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_apps.png new file mode 100644 index 000000000..3370b16fc Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_apps.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_mobile_form.png b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_form.png new file mode 100644 index 000000000..f655418a1 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_form.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_mobile_kanban.png b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_kanban.png new file mode 100644 index 000000000..f0b369deb Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_kanban.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_mobile_menu.png b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_menu.png new file mode 100644 index 000000000..1977831f5 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_mobile_menu.png differ diff --git a/third_party_addons/muk_web_theme/static/description/screenshot_settings.png b/third_party_addons/muk_web_theme/static/description/screenshot_settings.png new file mode 100644 index 000000000..b26aee6fc Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/screenshot_settings.png differ diff --git a/third_party_addons/muk_web_theme/static/description/service_development.png b/third_party_addons/muk_web_theme/static/description/service_development.png new file mode 100644 index 000000000..d64b66bda Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/service_development.png differ diff --git a/third_party_addons/muk_web_theme/static/description/service_infrastructure.png b/third_party_addons/muk_web_theme/static/description/service_infrastructure.png new file mode 100644 index 000000000..b899a3104 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/service_infrastructure.png differ diff --git a/third_party_addons/muk_web_theme/static/description/service_integration.png b/third_party_addons/muk_web_theme/static/description/service_integration.png new file mode 100644 index 000000000..76c5e80f4 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/service_integration.png differ diff --git a/third_party_addons/muk_web_theme/static/description/service_support.png b/third_party_addons/muk_web_theme/static/description/service_support.png new file mode 100644 index 000000000..4c530fafd Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/service_support.png differ diff --git a/third_party_addons/muk_web_theme/static/description/service_training.png b/third_party_addons/muk_web_theme/static/description/service_training.png new file mode 100644 index 000000000..19ea76e63 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/service_training.png differ diff --git a/third_party_addons/muk_web_theme/static/description/theme_screenshot.png b/third_party_addons/muk_web_theme/static/description/theme_screenshot.png new file mode 100644 index 000000000..bec4798e0 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/description/theme_screenshot.png differ diff --git a/third_party_addons/muk_web_theme/static/src/img/background.png b/third_party_addons/muk_web_theme/static/src/img/background.png new file mode 100644 index 000000000..b7788b9b0 Binary files /dev/null and b/third_party_addons/muk_web_theme/static/src/img/background.png differ diff --git a/third_party_addons/muk_web_theme/static/src/scss/colors.scss b/third_party_addons/muk_web_theme/static/src/scss/colors.scss new file mode 100644 index 000000000..581de80c4 --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/scss/colors.scss @@ -0,0 +1,13 @@ +// Colors + +$mk_color_appsmenu_text: #F8F9FA; +$mk_color_appbar_text: #DEE2E6; +$mk_color_appbar_active: #5D8DA8; +$mk_color_appbar_background: #111827; + +// Override + +$mk-appsmenu-color: $mk_color_appsmenu_text; +$mk-appbar-color: $mk_color_appbar_text; +$mk-appbar-active: $mk_color_appbar_active; +$mk-appbar-background: $mk_color_appbar_background; \ No newline at end of file diff --git a/third_party_addons/muk_web_theme/static/src/scss/variables.scss b/third_party_addons/muk_web_theme/static/src/scss/variables.scss new file mode 100644 index 000000000..07250f79a --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/scss/variables.scss @@ -0,0 +1 @@ +$o-navbar-badge-bg: $o-brand-primary; diff --git a/third_party_addons/muk_web_theme/static/src/views/form/form.scss b/third_party_addons/muk_web_theme/static/src/views/form/form.scss new file mode 100644 index 000000000..3efa72fd2 --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/views/form/form.scss @@ -0,0 +1,8 @@ +.o_form_view { + &:not(.o_field_highlight) .o_field_widget:not(.o_field_invalid):not(.o_field_highlight) .o_input:not(:hover):not(:focus) { + --o-input-border-color: #{$gray-200}; + } + &:not(.o_field_highlight) .o_required_modifier.o_field_widget:not(.o_field_invalid):not(.o_field_highlight) .o_input:not(:hover):not(:focus) { + --o-input-border-color: #{$gray-400}; + } +} \ No newline at end of file diff --git a/third_party_addons/muk_web_theme/static/src/webclient/appsmenu/appsmenu.js b/third_party_addons/muk_web_theme/static/src/webclient/appsmenu/appsmenu.js new file mode 100644 index 000000000..5365d3af5 --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/webclient/appsmenu/appsmenu.js @@ -0,0 +1,56 @@ +import { useEffect } from "@odoo/owl"; +import { url } from "@web/core/utils/urls"; +import { useBus, useService } from "@web/core/utils/hooks"; + +import { Dropdown } from "@web/core/dropdown/dropdown"; + +export class AppsMenu extends Dropdown { + setup() { + super.setup(); + this.commandPaletteOpen = false; + this.commandService = useService("command"); + this.companyService = useService('company'); + if (this.companyService.currentCompany.has_background_image) { + this.imageUrl = url('/web/image', { + model: 'res.company', + field: 'background_image', + id: this.companyService.currentCompany.id, + }); + } else { + this.imageUrl = '/muk_web_theme/static/src/img/background.png'; + } + useEffect( + (isOpen) => { + if (isOpen) { + const openMainPalette = (ev) => { + if ( + !this.commandServiceOpen && + ev.key.length === 1 && + !ev.ctrlKey && + !ev.altKey + ) { + this.commandService.openMainPalette( + { searchValue: `/${ev.key}` }, + () => { this.commandPaletteOpen = false; } + ); + this.commandPaletteOpen = true; + } + } + window.addEventListener("keydown", openMainPalette); + return () => { + window.removeEventListener("keydown", openMainPalette); + this.commandPaletteOpen = false; + } + } + }, + () => [this.state.isOpen] + ); + useBus(this.env.bus, "ACTION_MANAGER:UI-UPDATED", this.state.close); + } + onOpened() { + super.onOpened(); + if (this.menuRef && this.menuRef.el) { + this.menuRef.el.style.backgroundImage = `url('${this.imageUrl}')`; + } + } +} diff --git a/third_party_addons/muk_web_theme/static/src/webclient/appsmenu/appsmenu.scss b/third_party_addons/muk_web_theme/static/src/webclient/appsmenu/appsmenu.scss new file mode 100644 index 000000000..db68e905b --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/webclient/appsmenu/appsmenu.scss @@ -0,0 +1,67 @@ +.o_navbar_apps_menu .dropdown-toggle { + padding: 0px 14px !important; +} + +.mk_app_menu.dropdown-menu { + display: flex !important; + flex-direction: row !important; + flex-wrap: wrap !important; + align-content: flex-start; + right: 0 !important; + left: 0 !important; + bottom: 0 !important; + max-height: 100vh; + overflow-x: hidden; + overflow-y: auto; + border: none; + border-radius: 0; + user-select: none; + margin-top: 0 !important; + margin-bottom: 0 !important; + background: { + size: cover; + repeat: no-repeat; + position: center; + } + @include media-breakpoint-up(lg) { + padding: { + left: 20vw; + right: 20vw; + } + } + .o_app { + margin-top: 20px; + width: percentage(1/3); + background: none !important; + @include media-breakpoint-up(sm) { + width: percentage(1/4); + } + @include media-breakpoint-up(md) { + width: percentage(1/6); + } + > a { + display: flex; + align-items: center; + flex-direction: column; + .mk_app_icon { + width: 100%; + padding: 10px; + max-width: 70px; + border-radius: 0.375rem; + background-color: $white; + transform-origin: center bottom; + transition: box-shadow ease-in 0.1s, transform ease-in 0.1s; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 4px 4px rgba(0, 0, 0, 0.02); + } + .mk_app_name { + color: $mk-appsmenu-color; + } + } + &:hover { + .mk_app_icon { + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 8px 8px rgba(0, 0, 0, 0.03); + transform: translateY(-2px); + } + } + } +} diff --git a/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.js b/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.js new file mode 100644 index 000000000..ec97cd296 --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.js @@ -0,0 +1,19 @@ +import { patch } from '@web/core/utils/patch'; +import { useService } from '@web/core/utils/hooks'; + +import { NavBar } from '@web/webclient/navbar/navbar'; +import { AppsMenu } from "@muk_web_theme/webclient/appsmenu/appsmenu"; + +patch(NavBar.prototype, { + setup() { + super.setup(); + this.appMenuService = useService('app_menu'); + }, +}); + +patch(NavBar, { + components: { + ...NavBar.components, + AppsMenu, + }, +}); diff --git a/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.scss b/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.scss new file mode 100644 index 000000000..e0bd9b83d --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.scss @@ -0,0 +1,3 @@ +.o_main_navbar { + border-bottom: none !important; +} diff --git a/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.xml b/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.xml new file mode 100644 index 000000000..ecc78d9c9 --- /dev/null +++ b/third_party_addons/muk_web_theme/static/src/webclient/navbar/navbar.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party_addons/muk_web_theme/templates/web_layout.xml b/third_party_addons/muk_web_theme/templates/web_layout.xml new file mode 100644 index 000000000..0d6b85232 --- /dev/null +++ b/third_party_addons/muk_web_theme/templates/web_layout.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/third_party_addons/muk_web_theme/views/res_config_settings.xml b/third_party_addons/muk_web_theme/views/res_config_settings.xml new file mode 100644 index 000000000..715558b36 --- /dev/null +++ b/third_party_addons/muk_web_theme/views/res_config_settings.xml @@ -0,0 +1,102 @@ + + + + + + res.config.settings.form + res.config.settings + + + + 1 + + + + + + res.config.settings.form + res.config.settings + + + + 1 + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+