Commit 7b0a85f0 authored by Romain Courteaud's avatar Romain Courteaud

erp5_officejs: disable action filter change

parent f2b81e8f
...@@ -9,15 +9,19 @@ ...@@ -9,15 +9,19 @@
"object_web_view", "object_jio_search"]; "object_web_view", "object_jio_search"];
function filterViewList(views_dict, app_view, default_view) { function filterViewList(views_dict, app_view, default_view) {
console.warn('filterViewList', JSON.stringify(views_dict), JSON.stringify(app_view),
JSON.stringify(default_view));
// there must be only one "View" action (title = "View") // there must be only one "View" action (title = "View")
// this is for scenarios were the portal type has several "View" // this is for scenarios were the portal type has several "View"
// (like view, jio_view, custom_view) // (like view, jio_view, custom_view)
// priority: app_view ; default_view ; other // priority: app_view ; default_view ; other
return views_dict; // return views_dict;
var only_view, key, var only_view, key,
view_list = Object.keys(views_dict).map(function (key) { view_list = Object.keys(views_dict).map(function (key) {
if (views_dict[key].title === "View") { return key; } if (views_dict[key].title === "View") { return key; }
}); });
console.warn('filterViewList2', JSON.stringify(view_list));
if (view_list.includes(app_view)) { if (view_list.includes(app_view)) {
only_view = app_view; only_view = app_view;
} else if (view_list.includes(default_view)) { } else if (view_list.includes(default_view)) {
...@@ -30,6 +34,7 @@ ...@@ -30,6 +34,7 @@
delete views_dict[view_list[key]]; delete views_dict[view_list[key]];
} }
} }
console.warn('filterViewList3', JSON.stringify(views_dict));
return views_dict; return views_dict;
} }
......
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>988.10966.984.65433</string> </value> <value> <string>988.23680.9260.46796</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1606140846.1</float> <float>1606817358.88</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment