diff --git a/muk_web_client/README.md b/muk_web_client/README.md deleted file mode 100644 index da8c4a4..0000000 --- a/muk_web_client/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# MuK Web Client - -Extends the Odoo web client to include -bus channels. Channels can be created to listen to Odoo bus -notifications. To add a channel listener to the client just -extend the web client and declare a new bus channel. - -### Example - -```javascript -var WebClient = require('web.WebClient'); -var session = require('web.session'); - -WebClient.include({ - show_application: function() { - var channel = session.db + '_mychannel'; - this.bus_declare_channel(channel, this.doSomething); - return this._super(); - }, - doSomething: function(message) { - ... - } -}); -``` \ No newline at end of file diff --git a/muk_web_client/__init__.py b/muk_web_client/__init__.py index 48ccf85..3a632f4 100644 --- a/muk_web_client/__init__.py +++ b/muk_web_client/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - ################################################################################### # # Copyright (C) 2017 MuK IT GmbH @@ -18,3 +16,5 @@ # along with this program. If not, see . # ################################################################################### + +from . import models \ No newline at end of file diff --git a/muk_web_client/__manifest__.py b/muk_web_client/__manifest__.py index 1d91dc7..e6e3575 100644 --- a/muk_web_client/__manifest__.py +++ b/muk_web_client/__manifest__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - ################################################################################### # # Copyright (C) 2017 MuK IT GmbH @@ -22,16 +20,11 @@ { "name": "MuK Web Client", "summary": """Odoo Web Client Extension""", - "description": """ - Extends the Odoo web client to include - bus channels. Channels can be created to listen to Odoo bus - notifications. To add a channel listener to the client just - extend the web client and declare a new bus channel. - """, - "version": "11.0.1.0.1", + "version": "11.0.2.0.0", "category": "Extra Tools", "license": "AGPL-3", "website": "http://www.mukit.at", + "live_test_url": "https://demo.mukit.at/web/login", "author": "MuK IT", "contributors": [ "Mathias Markl ", @@ -39,11 +32,12 @@ "depends": [ "web", "bus", + "base_setup", + "muk_web_utils", ], "data": [ "template/assets.xml", - ], - "demo": [ + "views/res_config_settings_view.xml", ], "qweb": [ "static/src/xml/*.xml", diff --git a/muk_web_client/doc/changelog.rst b/muk_web_client/doc/changelog.rst index 9ee2b48..f2ae21c 100644 --- a/muk_web_client/doc/changelog.rst +++ b/muk_web_client/doc/changelog.rst @@ -1,3 +1,8 @@ +`2.0.0` +------- + +- Migrated to Python 3 + `1.0.0` ------- diff --git a/muk_web_client/doc/index.rst b/muk_web_client/doc/index.rst new file mode 100644 index 0000000..6de6667 --- /dev/null +++ b/muk_web_client/doc/index.rst @@ -0,0 +1,48 @@ +============== +MuK Web Client +============== + +Extends the Odoo web client to include bus channels. Channels can be created to +listen to Odoo bus notifications. To add a channel listener to the client just +extend the web client and declare a new bus channel. + +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 modus and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Configuration +============= + +No additional configuration is needed to use this module. + +Usage +============= + +This module has no direct visible effect on the system. It adds bus channels +to the existing web client. + +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/muk_web_client/i18n/de.po b/muk_web_client/i18n/de.po index 922c1dd..0e05ded 100644 --- a/muk_web_client/i18n/de.po +++ b/muk_web_client/i18n/de.po @@ -1,16 +1,53 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: +# * muk_web_client # msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-19 12:40+0000\n" -"PO-Revision-Date: 2018-01-19 12:40+0000\n" +"POT-Creation-Date: 2018-05-04 22:53+0000\n" +"PO-Revision-Date: 2018-05-05 00:55+0200\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"Language: de\n" +"X-Generator: Poedit 2.0.6\n" +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Save this page and come back here to set up the feature." +msgstr "Speichern diese Seite und kommen Sie hierher zurück, um das Feature einzurichten." + +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Automated Refresh" +msgstr "Automatisches Neuladen" + +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Define action rules to automatically refresh views" +msgstr "Definieren von Aktionsregeln zur automatischen Aktualisierung von Ansichten" + +#. module: muk_web_client +#: model:ir.model.fields,help:muk_web_client.field_res_config_settings_module_muk_web_client_refresh +msgid "Define action rules to automatically refresh views." +msgstr "Definieren von Aktionsregeln zur automatischen Aktualisierung von Ansichten." + +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Web Client" +msgstr "Web Client" + +#. module: muk_web_client +#: model:ir.model.fields,field_description:muk_web_client.field_res_config_settings_module_muk_web_client_refresh +msgid "Web Refresh" +msgstr "Web Refresh" + +#. module: muk_web_client +#: model:ir.model,name:muk_web_client.model_res_config_settings +msgid "res.config.settings" +msgstr "res.config.settings" diff --git a/muk_web_client/i18n/muk_web_client.pot b/muk_web_client/i18n/muk_web_client.pot index 922c1dd..51c1c49 100644 --- a/muk_web_client/i18n/muk_web_client.pot +++ b/muk_web_client/i18n/muk_web_client.pot @@ -1,12 +1,13 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: +# * muk_web_client # msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-19 12:40+0000\n" -"PO-Revision-Date: 2018-01-19 12:40+0000\n" +"POT-Creation-Date: 2018-05-04 22:53+0000\n" +"PO-Revision-Date: 2018-05-04 22:53+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -14,3 +15,38 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Save this page and come back here to set up the feature." +msgstr "" + +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Automated Refresh" +msgstr "" + +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Define action rules to automatically refresh views" +msgstr "" + +#. module: muk_web_client +#: model:ir.model.fields,help:muk_web_client.field_res_config_settings_module_muk_web_client_refresh +msgid "Define action rules to automatically refresh views." +msgstr "" + +#. module: muk_web_client +#: model:ir.ui.view,arch_db:muk_web_client.res_config_settings_view_form +msgid "Web Client" +msgstr "" + +#. module: muk_web_client +#: model:ir.model.fields,field_description:muk_web_client.field_res_config_settings_module_muk_web_client_refresh +msgid "Web Refresh" +msgstr "" + +#. module: muk_web_client +#: model:ir.model,name:muk_web_client.model_res_config_settings +msgid "res.config.settings" +msgstr "" + diff --git a/muk_web_client/models/__init__.py b/muk_web_client/models/__init__.py new file mode 100644 index 0000000..6c0ccad --- /dev/null +++ b/muk_web_client/models/__init__.py @@ -0,0 +1,20 @@ +################################################################################### +# +# Copyright (C) 2017 MuK IT GmbH +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import res_config_settings diff --git a/muk_web_client/models/res_config_settings.py b/muk_web_client/models/res_config_settings.py new file mode 100644 index 0000000..39eccb4 --- /dev/null +++ b/muk_web_client/models/res_config_settings.py @@ -0,0 +1,29 @@ +################################################################################### +# +# Copyright (C) 2017 MuK IT GmbH +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from odoo import fields, models + +class ResConfigSettings(models.TransientModel): + + _inherit = 'res.config.settings' + + module_muk_web_client_refresh = fields.Boolean( + string="Web Refresh", + help="Define action rules to automatically refresh views.") + \ No newline at end of file diff --git a/muk_web_client/static/description/index.html b/muk_web_client/static/description/index.html index f9e4ba8..af360f2 100644 --- a/muk_web_client/static/description/index.html +++ b/muk_web_client/static/description/index.html @@ -9,14 +9,13 @@
-
+

Overview

- Extends the Odoo web client to include - bus channels. Channels can be created to listen to Odoo bus - notifications. To add a channel listener to the client just - extend the web client and declare a new bus channel. -

+ Extends the Odoo web client to include bus channels. Channels can be + created to listen to Odoo bus notifications. To add a channel + listener to the client just extend the web client and declare a new + bus channel.

 		    	
 var WebClient = require('web.WebClient');
@@ -24,9 +23,9 @@ var session = require('web.session');
 
 WebClient.include({
     show_application: function() {
-        var channel = session.db + '_mychannel';
+        var channel = 'mychannel';
         this.bus_declare_channel(channel, this.doSomething);
-        return this._super();
+        return this._super.apply(this, arguments);
     },
 	doSomething: function(message) {
 		...
@@ -38,14 +37,45 @@ WebClient.include({
 	
+
+

Demo

+
+
+
User:
+
+
+
apps
+
+
+
Password:
+
+
+
demo
+
+
+ +
+

Help and Support

+
Feel free to + contact us, if you need any help with your Odoo integration or addiontal + features.
+ + + + + + + res.config.settings.view.form + res.config.settings + + +
+

Web Client

+
+
+
+ +
+
+
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/muk_web_client_refresh/README.md b/muk_web_client_refresh/README.md deleted file mode 100644 index 2dc79ed..0000000 --- a/muk_web_client_refresh/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# MuK Web Client Refresh - -Adds a "refresh" channel to the web client, -which can be used to trigger a view refresh without refreshing the -browser itself. Furthermore, it allows the user the creation of -"refresh" rules. These rules can be applied to any Odoo model and -trigger a refresh either on create, write or unlink. - -## Python Support - -Besides creating a "refresh" rule, a view refresh can be triggered -manually via python. This can be useful if there is a need for a -view refresh on other operations like an action. - -```python -self.env['bus.bus'].sendone('refresh', [self.env.cr.dbname, self._name, self._uid]) -``` \ No newline at end of file diff --git a/muk_web_client_refresh/__init__.py b/muk_web_client_refresh/__init__.py index e683dbc..64773bc 100644 --- a/muk_web_client_refresh/__init__.py +++ b/muk_web_client_refresh/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - ################################################################################### # # Copyright (C) 2017 MuK IT GmbH @@ -19,4 +17,5 @@ # ################################################################################### +from . import controllers from . import models \ No newline at end of file diff --git a/muk_web_client_refresh/__manifest__.py b/muk_web_client_refresh/__manifest__.py index 1fed39d..d00fe2e 100644 --- a/muk_web_client_refresh/__manifest__.py +++ b/muk_web_client_refresh/__manifest__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - ################################################################################### # # Copyright (C) 2017 MuK IT GmbH @@ -22,31 +20,23 @@ { "name": "MuK Web Refresh", "summary": """Web Client Refresh""", - "description": """ - Adds a "refresh" channel to the web client, - which can be used to trigger a view refresh without refreshing the - browser itself. Furthermore, it allows the user the creation of - "refresh" rules. These rules can be applied to any Odoo model and - trigger a refresh either on create, write or unlink. - """, - "version": "11.0.1.0.4", + "version": "11.0.2.0.0", "category": "Extra Tools", "license": "AGPL-3", "website": "http://www.mukit.at", + "live_test_url": "https://demo.mukit.at/web/login", "author": "MuK IT", "contributors": [ "Mathias Markl ", ], "depends": [ + "base_automation", "muk_web_client", ], "data": [ "template/assets.xml", - "security/ir.model.access.csv", - "views/refresh_menu.xml", - "views/refresh_rule_view.xml", - ], - "demo": [ + "views/refresh_action_view.xml", + "views/res_config_settings_view.xml", ], "qweb": [ "static/src/xml/*.xml", diff --git a/muk_web_client_refresh/controllers/__init__.py b/muk_web_client_refresh/controllers/__init__.py new file mode 100644 index 0000000..bfffb4d --- /dev/null +++ b/muk_web_client_refresh/controllers/__init__.py @@ -0,0 +1,20 @@ +################################################################################### +# +# Copyright (C) 2017 MuK IT GmbH +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import main diff --git a/muk_web_client_refresh/controllers/main.py b/muk_web_client_refresh/controllers/main.py new file mode 100644 index 0000000..b325d89 --- /dev/null +++ b/muk_web_client_refresh/controllers/main.py @@ -0,0 +1,34 @@ +################################################################################### +# +# Copyright (C) 2017 MuK IT GmbH +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +import logging + +from odoo import http +from odoo.http import request + +_logger = logging.getLogger(__name__) + +class RefreshController(http.Controller): + + @http.route('/config/muk_web_client_refresh.refresh_delay', type='json', auth="user") + def refresh_delay(self, **kw): + params = request.env['ir.config_parameter'].sudo() + return { + 'refresh_delay': int(params.get_param("muk_web_client_refresh.refresh_delay", default=10000)) + } \ No newline at end of file diff --git a/muk_web_client_refresh/doc/changelog.rst b/muk_web_client_refresh/doc/changelog.rst index 9ee2b48..d161cc9 100644 --- a/muk_web_client_refresh/doc/changelog.rst +++ b/muk_web_client_refresh/doc/changelog.rst @@ -1,3 +1,9 @@ +`2.0.0` +------- + +- Migrated to Python 3 +- Replaced Auto Refresh Rule by Automated Action + `1.0.0` ------- diff --git a/muk_web_client_refresh/doc/index.rst b/muk_web_client_refresh/doc/index.rst new file mode 100644 index 0000000..c70aea0 --- /dev/null +++ b/muk_web_client_refresh/doc/index.rst @@ -0,0 +1,53 @@ +====================== +MuK Web Client Refresh +====================== + +Adds a channel called "refresh" to the web client, which can be used to trigger +a view reload without refreshing the browser itself. Furthermore, it allows the +user the creation of action rules. These rules can be applied to any model and +trigger a refresh either on create, update or unlink. + +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 modus and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Configuration +============= + +To configure this module, you need to: + +#. Go to *Settings* while being in debug mode. +#. Afterwards go to *Technical -> Automation -> Automated Refresh*. +#. And create a new refresh action. + +Usage +============= + +Besides creating a action rule, a view refresh can be triggered manually via python. +This can be useful if there is a need for a view reload on other operations. + +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/muk_web_client_refresh/i18n/de.po b/muk_web_client_refresh/i18n/de.po index 0dc8f7b..0f07f15 100644 --- a/muk_web_client_refresh/i18n/de.po +++ b/muk_web_client_refresh/i18n/de.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-19 12:42+0000\n" -"PO-Revision-Date: 2018-01-19 13:45+0100\n" +"POT-Creation-Date: 2018-05-04 22:56+0000\n" +"PO-Revision-Date: 2018-05-05 00:58+0200\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,110 +15,50 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" "Language: de\n" -"X-Generator: Poedit 2.0.5\n" +"X-Generator: Poedit 2.0.6\n" #. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_form -msgid "Access Rights" -msgstr "Zugriffsrechte" +#: model:ir.actions.act_window,name:muk_web_client_refresh.action_client_refresh_actions +#: model:ir.ui.menu,name:muk_web_client_refresh.menu_client_refresh_actions +msgid "Automated Refresh" +msgstr "Automatisches Neuladen" #. module: muk_web_client_refresh -#: model:ir.ui.menu,name:muk_web_client_refresh.cat_menu_refresh -msgid "Auto Refresh" -msgstr "Automatische Aktualisierung" +#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_client_refresh_actions_tree +msgid "Automation" +msgstr "Automatisierung" #. module: muk_web_client_refresh -#: model:ir.model,name:muk_web_client_refresh.model_muk_web_client_refresh_rule -msgid "Auto Refresh Rule" -msgstr "Regeln für die automatische Aktualisierung" +#: model:ir.actions.act_window,help:muk_web_client_refresh.action_client_refresh_actions +msgid "Click to setup a new automated refresh action." +msgstr "Klicken Sie hier, um eine neue automatische Aktualisierungsaktion einzurichten." #. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_create_uid -msgid "Created by" -msgstr "Erstellt von" +#: model:ir.ui.view,arch_db:muk_web_client_refresh.res_config_settings_view_form +msgid "Configure Actions" +msgstr "Aktionen konfigurieren" #. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_create_date -msgid "Created on" -msgstr "Erstellt am" +#: model:ir.model.fields,field_description:muk_web_client_refresh.field_res_config_settings_refresh_delay +#: model:ir.ui.view,arch_db:muk_web_client_refresh.res_config_settings_view_form +msgid "Delay" +msgstr "Verzögerung" #. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_display_name -msgid "Display Name" -msgstr "Anzeigename" - -#. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_tree -msgid "Document Settings" -msgstr "Einstellungen" - -#. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_form -msgid "General" -msgstr "Allgemein" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_id -msgid "ID" -msgstr "ID" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule___last_update -msgid "Last Modified on" -msgstr "Zuletzt geändert am" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_write_uid -msgid "Last Updated by" -msgstr "Zuletzt aktualisiert durch" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_write_date -msgid "Last Updated on" -msgstr "Zuletzt aktualisiert am" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_model -msgid "Model" -msgstr "Modell" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_name -msgid "Name" -msgstr "Name" - -#. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_form -msgid "Refresh Rule" -msgstr "Regel für die Aktualisierung" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_refresh_create -msgid "Refresh on Create" -msgstr "Aktualisierung nach der Erstellung" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_refresh_unlink -msgid "Refresh on Unlink" -msgstr "Aktualisierung nach dem Löschen" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_refresh_write -msgid "Refresh on Writes" -msgstr "Aktualisierung nach dem Schreiben" - -#. module: muk_web_client_refresh -#: model:ir.actions.act_window,name:muk_web_client_refresh.action_refresh_rule -#: model:ir.ui.menu,name:muk_web_client_refresh.menu_dms_settings -msgid "Rules" -msgstr "Regeln" +#: model:ir.model.fields,help:muk_web_client_refresh.field_res_config_settings_refresh_delay +msgid "" +"Delays the execution of refresh and thus prevents the view from being reloaded too often.\n" +" For example, a delay of 1000 (ms) would mean that the view cannot be reloaded more than once a second. " +msgstr "" +"Verzögert die Ausführung des Refresh und verhindert so, dass der View zu oft neu geladen wird.\n" +" Beispielsweise würde eine Verzögerung von 1000 (ms) bedeuten, dass der View nicht mehr als einmal pro Sekunde neu geladen werden kann. " #. module: muk_web_client_refresh -#: model:ir.model.fields,help:muk_web_client_refresh.field_muk_web_client_refresh_rule_model -msgid "Select model for which you want to refresh the corresponding views." -msgstr "Wählen Sie das Modell aus, für das Sie die entsprechenden Sichten aktualisieren möchten." +#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_client_refresh_actions_form +msgid "e.g. Refresh Users on Create" +msgstr "z.B. Benutzer beim Anlegen neuladen" #. module: muk_web_client_refresh -#: sql_constraint:muk_web_client_refresh.rule:0 -msgid "There is already a rule defined on this model." -msgstr "Für dieses Modell ist bereits eine Regel definiert." +#: model:ir.model,name:muk_web_client_refresh.model_res_config_settings +msgid "res.config.settings" +msgstr "res.config.settings" diff --git a/muk_web_client_refresh/i18n/muk_web_client_refresh.pot b/muk_web_client_refresh/i18n/muk_web_client_refresh.pot index 983b4d8..303a7bf 100644 --- a/muk_web_client_refresh/i18n/muk_web_client_refresh.pot +++ b/muk_web_client_refresh/i18n/muk_web_client_refresh.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-19 12:42+0000\n" -"PO-Revision-Date: 2018-01-19 12:42+0000\n" +"POT-Creation-Date: 2018-05-04 22:55+0000\n" +"PO-Revision-Date: 2018-05-04 22:55+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,108 +16,45 @@ msgstr "" "Plural-Forms: \n" #. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_form -msgid "Access Rights" +#: model:ir.actions.act_window,name:muk_web_client_refresh.action_client_refresh_actions +#: model:ir.ui.menu,name:muk_web_client_refresh.menu_client_refresh_actions +msgid "Automated Refresh" msgstr "" #. module: muk_web_client_refresh -#: model:ir.ui.menu,name:muk_web_client_refresh.cat_menu_refresh -msgid "Auto Refresh" +#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_client_refresh_actions_tree +msgid "Automation" msgstr "" #. module: muk_web_client_refresh -#: model:ir.model,name:muk_web_client_refresh.model_muk_web_client_refresh_rule -msgid "Auto Refresh Rule" +#: model:ir.actions.act_window,help:muk_web_client_refresh.action_client_refresh_actions +msgid "Click to setup a new automated refresh action." msgstr "" #. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_create_uid -msgid "Created by" +#: model:ir.ui.view,arch_db:muk_web_client_refresh.res_config_settings_view_form +msgid "Configure Actions" msgstr "" #. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_create_date -msgid "Created on" +#: model:ir.model.fields,field_description:muk_web_client_refresh.field_res_config_settings_refresh_delay +#: model:ir.ui.view,arch_db:muk_web_client_refresh.res_config_settings_view_form +msgid "Delay" msgstr "" #. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_display_name -msgid "Display Name" +#: model:ir.model.fields,help:muk_web_client_refresh.field_res_config_settings_refresh_delay +msgid "Delays the execution of refresh and thus prevents the view from being reloaded too often.\n" +" For example, a delay of 1000 (ms) would mean that the view cannot be reloaded more than once a second. " msgstr "" #. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_tree -msgid "Document Settings" +#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_client_refresh_actions_form +msgid "e.g. Refresh Users on Create" msgstr "" #. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_form -msgid "General" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_id -msgid "ID" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule___last_update -msgid "Last Modified on" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_write_uid -msgid "Last Updated by" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_write_date -msgid "Last Updated on" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_model -msgid "Model" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_name -msgid "Name" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.ui.view,arch_db:muk_web_client_refresh.view_refresh_rule_form -msgid "Refresg Rule" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_refresh_create -msgid "Refresh on Create" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_refresh_unlink -msgid "Refresh on Unlink" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,field_description:muk_web_client_refresh.field_muk_web_client_refresh_rule_refresh_write -msgid "Refresh on Writes" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.actions.act_window,name:muk_web_client_refresh.action_refresh_rule -#: model:ir.ui.menu,name:muk_web_client_refresh.menu_dms_settings -msgid "Rules" -msgstr "" - -#. module: muk_web_client_refresh -#: model:ir.model.fields,help:muk_web_client_refresh.field_muk_web_client_refresh_rule_model -msgid "Select model for which you want to refresh the corresponding views." -msgstr "" - -#. module: muk_web_client_refresh -#: sql_constraint:muk_web_client_refresh.rule:0 -msgid "There is already a rule defined on this model." +#: model:ir.model,name:muk_web_client_refresh.model_res_config_settings +msgid "res.config.settings" msgstr "" diff --git a/muk_web_client_refresh/models/__init__.py b/muk_web_client_refresh/models/__init__.py index 0a6eaf2..6c0ccad 100644 --- a/muk_web_client_refresh/models/__init__.py +++ b/muk_web_client_refresh/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - ################################################################################### # # Copyright (C) 2017 MuK IT GmbH @@ -19,4 +17,4 @@ # ################################################################################### -from . import refresh_rule \ No newline at end of file +from . import res_config_settings diff --git a/muk_web_client_refresh/models/res_config_settings.py b/muk_web_client_refresh/models/res_config_settings.py new file mode 100644 index 0000000..fedccd6 --- /dev/null +++ b/muk_web_client_refresh/models/res_config_settings.py @@ -0,0 +1,42 @@ +################################################################################### +# +# Copyright (C) 2017 MuK IT GmbH +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from odoo import api, fields, models + +class ResConfigSettings(models.TransientModel): + + _inherit = 'res.config.settings' + + refresh_delay = fields.Integer( + string="Delay", + help="""Delays the execution of refresh and thus prevents the view from being reloaded too often. + For example, a delay of 1000 (ms) would mean that the view cannot be reloaded more than once a second. """) + + def set_values(self): + res = super(ResConfigSettings, self).set_values() + param = self.env['ir.config_parameter'].sudo() + param.set_param("muk_web_client_refresh.refresh_delay", self.refresh_delay) + return res + + @api.model + def get_values(self): + res = super(ResConfigSettings, self).get_values() + params = self.env['ir.config_parameter'].sudo() + res.update(refresh_delay=int(params.get_param("muk_web_client_refresh.refresh_delay", default=1000))) + return res diff --git a/muk_web_client_refresh/static/description/demo.gif b/muk_web_client_refresh/static/description/demo.gif new file mode 100644 index 0000000..ad4dd92 Binary files /dev/null and b/muk_web_client_refresh/static/description/demo.gif differ diff --git a/muk_web_client_refresh/static/description/index.html b/muk_web_client_refresh/static/description/index.html index 28d93d0..ee9ff24 100644 --- a/muk_web_client_refresh/static/description/index.html +++ b/muk_web_client_refresh/static/description/index.html @@ -2,74 +2,105 @@

Auto Refresh

View Refresh Channel

-

- MuK IT GmbH - www.mukit.at -

-
- -
+

MuK IT GmbH - + www.mukit.at

+
+ +
-
+

Overview

-

Adds a "refresh" channel to the web client, - which can be used to trigger a view refresh without refreshing the - browser itself. Furthermore, it allows the user the creation of - "refresh" rules. These rules can be applied to any Odoo model and - trigger a refresh either on create, write or unlink.

+

Adds a channel called "refresh" + to the web client, which can be used to trigger a view reload + without refreshing the browser itself. Furthermore, it allows the + user the creation of action rules. These rules can be applied to any + model and trigger a refresh either on create, update or unlink.

-

Rule View

-
-

- Refresh rules can be created easily inside of Odoo. The view to - create rules is located under "Settings" "Technical" "Auto Refresh" "Rule".
- Each model can only have one corresponding rule to prevent - inconsistency. -

-
-
- +
+

Rule View

+
+

+ Refresh actions can be created easily inside of Odoo. The view to + create such rules is located under "Settings" "Technical" "Automation" "Automated + Refresh". +

+
+
+ +
-

Chatter Support

-
- +
+

Chatter Support

+
+ +
+
+

The module also has support for + the Odoo Chatter Widget. As soon as a new message or activity is + created, a corresponding refresh message is sent.

+
-
-

Auto Refresh supports the Odoo - Chatter Widget. By creating a rule for the Message model and one for - the Activity model, the corresponding views will refresh if a new - message is sent.

+
+
+ +
+

Demo

+
+
+
User:
+
+
apps
+
+
+
Password:
+
+
+
demo
+
+
+

Help and Support

+
Feel free to + contact us, if you need any help with your Odoo integration or + addiontal features.
+ + + + + + + base.automation.form + base.automation + primary + + + + e.g. Refresh Users on Create + + + 1 + + + 1 + + + + + + base.automation.tree + base.automation + + + + + + + + + + + + Automated Refresh + base.automation + form + tree,form + + [ + ['code', '=', 'env["bus.bus"].sendone("refresh", {"model": model._name, "uid": env.user.id, "ids": (record | records).mapped("id")})'] + ] + + + { + 'default_state': 'code', + 'default_code': 'env["bus.bus"].sendone("refresh", {"model": model._name, "uid": env.user.id, "ids": (record | records).mapped("id")})' + } + + +

+ Click to setup a new automated refresh action. +

+
+ +
+ + + +
diff --git a/muk_web_client_refresh/views/res_config_settings_view.xml b/muk_web_client_refresh/views/res_config_settings_view.xml new file mode 100644 index 0000000..97b55b4 --- /dev/null +++ b/muk_web_client_refresh/views/res_config_settings_view.xml @@ -0,0 +1,41 @@ + + + + + + + + res.config.settings.view.form + res.config.settings + + +
+
+
+
+
+
+ +
+ diff --git a/muk_web_utils/README.md b/muk_web_utils/README.md deleted file mode 100644 index cf63f5c..0000000 --- a/muk_web_utils/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# MuK Web Utils - -Technical module to provide some utility features. \ No newline at end of file diff --git a/muk_web_utils/__init__.py b/muk_web_utils/__init__.py index 91ba206..e0bf9f9 100644 --- a/muk_web_utils/__init__.py +++ b/muk_web_utils/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - ################################################################################### # # Copyright (C) 2018 MuK IT GmbH diff --git a/muk_web_utils/__manifest__.py b/muk_web_utils/__manifest__.py index fbac433..63fc612 100644 --- a/muk_web_utils/__manifest__.py +++ b/muk_web_utils/__manifest__.py @@ -1,5 +1,3 @@ -## -*- coding: utf-8 -*- - ################################################################################### # # Copyright (C) 2018 MuK IT GmbH @@ -22,13 +20,11 @@ { "name": "MuK Web Utils", "summary": """Utility Features""", - "description": """ - Technical module to provide some utility features. - """, - "version": "11.0.1.0.4", + "version": "11.0.2.0.0", "category": "Extra Tools", "license": "AGPL-3", "website": "http://www.mukit.at", + "live_test_url": "https://demo.mukit.at/web/login", "author": "MuK IT", "contributors": [ "Mathias Markl ", @@ -40,8 +36,6 @@ "data": [ "template/assets.xml", ], - "demo": [ - ], "qweb": [ "static/src/xml/*.xml", ], diff --git a/muk_web_utils/doc/changelog.rst b/muk_web_utils/doc/changelog.rst index 9ee2b48..f2ae21c 100644 --- a/muk_web_utils/doc/changelog.rst +++ b/muk_web_utils/doc/changelog.rst @@ -1,3 +1,8 @@ +`2.0.0` +------- + +- Migrated to Python 3 + `1.0.0` ------- diff --git a/muk_web_utils/doc/index.rst b/muk_web_utils/doc/index.rst new file mode 100644 index 0000000..c1ab646 --- /dev/null +++ b/muk_web_utils/doc/index.rst @@ -0,0 +1,46 @@ +============= +MuK Web Utils +============= + +Technical module to provide some utility features and libraries that can be used +in other applications. This module has no direct effect on the running system. + +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 modus and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Configuration +============= + +No additional configuration is needed to use this module. + +Usage +============= + +This module has no direct visible effect on the system. It provide utility features. + +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/muk_web_utils/static/description/index.html b/muk_web_utils/static/description/index.html index a90b9ca..0ca5857 100644 --- a/muk_web_utils/static/description/index.html +++ b/muk_web_utils/static/description/index.html @@ -9,23 +9,56 @@
-
+

Overview

Technical module to provide some utility - features. The module is mainly used as a dependency by other - modules and to provide a collection of common libraries.

+ features. The module is mainly used as a dependency by other modules + and to provide a collection of common libraries. It has no direct + visible effect on the system.

+
+

Demo

+
+
+
User:
+
+
+
apps
+
+
+
Password:
+
+
+
demo
+
+
+ +
+

Help and Support

+
Feel free to + contact us, if you need any help with your Odoo integration or + addiontal features.
%20common', "", "", login='admin', timeout=360) - def test_common(self): + def test_jquery(self): self.phantom_js('/web/tests?filter=utils%20>%20jquery', "", "", login='admin', timeout=360) - def test_common(self): + def test_mimetype(self): self.phantom_js('/web/tests?filter=utils%20>%20mimetype', "", "", login='admin', timeout=360) \ No newline at end of file