From cde5b232e8a1170f4f7a1242f93edc021ebfeefc Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Mon, 2 Oct 2017 15:56:31 +0200 Subject: [REF] stock: alert on show details if not saved It's not possible to click on the show details button if the picking is not saved. It's a limitation of the webclient. This commit introduces a waring telling the user to save the form view first. --- addons/web/static/src/js/services/data_manager.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'addons/web/static/src/js/services/data_manager.js') diff --git a/addons/web/static/src/js/services/data_manager.js b/addons/web/static/src/js/services/data_manager.js index 48a0e2676ae..911e1c5582f 100644 --- a/addons/web/static/src/js/services/data_manager.js +++ b/addons/web/static/src/js/services/data_manager.js @@ -408,6 +408,9 @@ return core.Class.extend({ if (!_.isObject(node.attrs.modifiers)) { node.attrs.modifiers = node.attrs.modifiers ? JSON.parse(node.attrs.modifiers) : {}; } + if (!_.isObject(node.attrs.options) && node.tag === 'button') { + node.attrs.options = node.attrs.options ? JSON.parse(node.attrs.options) : {}; + } if (node.tag === 'field') { fieldsInfo[node.attrs.name] = self._processField(viewType, fields[node.attrs.name], node.attrs ? _.clone(node.attrs) : {}); -- cgit v1.2.3