=== added file 'addons/openerp/controllers/templates/shortcut_tooltip.mako'
--- addons/openerp/controllers/templates/shortcut_tooltip.mako 1970-01-01 00:00:00 +0000
+++ addons/openerp/controllers/templates/shortcut_tooltip.mako 2017-10-27 15:15:39 +0000
@@ -0,0 +1,13 @@
+<%
+# put in try block to prevent improper redirection on connection refuse error
+try:
+ SHORTCUT = cp.request.pool.get_controller("/openerp/shortcut_tooltip")
+ display_message = SHORTCUT.get_show_shortcut()
+ message = _("You haven't recently used a keyboard shortcut. You can see what shortcuts are available on this screen by holding SHIFT + CTRL.")
+except:
+ display_message = False
+ message = 'toto'
+%>
+% if display_message:
+
${message | h}
+% endif
=== modified file 'addons/openerp/po/javascript/fr.po'
--- addons/openerp/po/javascript/fr.po 2017-02-06 11:21:15 +0000
+++ addons/openerp/po/javascript/fr.po 2017-10-27 15:15:39 +0000
@@ -114,3 +114,7 @@
#: static/javascript/form.js
msgid "You cannot upload files bigger than %(max_size)sMB, current size is %(size)sMB"
msgstr "Vous ne pouvez pas envoyer des fichiers plus gros que %(max_size)sMB, la taille actuelle est de %(size)sMB"
+
+#: addons/openerp/controllers/templates/form.mako
+msgid "The form contains errors."
+msgstr "Le formulaire comporte des erreurs."
=== modified file 'addons/openerp/po/messages/fr.po'
--- addons/openerp/po/messages/fr.po 2017-01-02 14:59:00 +0000
+++ addons/openerp/po/messages/fr.po 2017-10-27 15:15:39 +0000
@@ -1775,3 +1775,7 @@
#~ msgid "Click here to add new image."
#~ msgstr "Cliquez ici pour ajouter une nouvelle image"
+#: controllers/templates/shortcut_tooltip.mako:6
+#, python-format
+msgid "You haven't recently used a keyboard shortcut. You can see what shortcuts are available on this screen by holding SHIFT + CTRL."
+msgstr "Vous n'avez pas utilisé de raccourci clavier récemment. Vous pouvez voir quels raccourcis sont disponibles sur cet écran en utilisant CTRL + SHIFT."
=== modified file 'addons/openerp/static/css/screen.css'
--- addons/openerp/static/css/screen.css 2017-07-10 08:56:45 +0000
+++ addons/openerp/static/css/screen.css 2017-10-27 15:15:39 +0000
@@ -2378,3 +2378,13 @@
background: rgba(255, 165, 0, .6);
white-space: pre-line;
}
+
+#shortcut_message {
+ font-weight: bold;
+ font-size: 1.2em;
+ height: 2em;
+ text-align: center;
+ background: rgb(184, 222, 130);
+ background: rgba(184, 222, 130, .6);
+ white-space: pre-line;
+}
=== modified file 'addons/openerp/static/css/tips.css'
--- addons/openerp/static/css/tips.css 2010-11-23 10:11:52 +0000
+++ addons/openerp/static/css/tips.css 2017-10-27 15:15:39 +0000
@@ -39,3 +39,22 @@
font-size: 12px;
}
+
+.shortcut_tooltip {
+ padding: 4px;
+ text-align: center;
+ font-family: sans-serif;
+ font-size: 11px;
+ color: #666666;
+ z-index: 1000;
+ border-radius: 6px;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ background: #FCF9A7;
+ border: 1px solid #999;
+ max-width: 500px;
+ opacity: 1;
+ -webkit-transition: opacity 1000ms linear;
+ transition: opacity 1000ms linear;
+ font-weight: bold;
+}
=== modified file 'addons/openerp/static/javascript/form.js'
--- addons/openerp/static/javascript/form.js 2017-10-20 13:34:27 +0000
+++ addons/openerp/static/javascript/form.js 2017-10-27 15:15:39 +0000
@@ -97,6 +97,27 @@
var prefix = src && src != '_terp_list' ? src + '/' : '';
+ // Here we do a sanity check that there aren't multiple element with
+ // the same id 'prefix/_terp_model'
+ // If this is the case, we introduce some delay (call back the same
+ // function later)
+ //
+ // This can happen in some asynchronous edge-case where the DOM is not
+ // fully loaded yet and in particular there's a remaining element with
+ // _terp_model = ir.ui.menu
+ // which might trigger the opening of a completely unrealted view
+ //
+ // You might reproduce the issue by monitoring the value of
+ // openobject.dom.get(prefix + '_terp_model').value
+ // when loading for instance the list of Commitment Vouchers
+ //
+ // See https://jira.unifield.org/browse/US-3589
+ //
+ if ($("[id="+prefix+"_terp_model]").length > 1) {
+ callLater(0.1, openRecord, id, src, target, readonly);
+ return;
+ }
+
var args = {
'model': openobject.dom.get(prefix + '_terp_model').value,
'id': id || 'False',
@@ -255,11 +276,11 @@
}
-function error_display(msg) {
+function error_display(msg, title='Warning Message') {
var error = jQuery("