From 81877310bc3247a0d9998194e6561e04b8706098 Mon Sep 17 00:00:00 2001 From: Julien Castiaux Date: Tue, 30 Apr 2019 09:42:22 +0000 Subject: [FIX] web: ignore field `message_attachment_count` in debug menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Open a record with a chatter (ie an opw task), add an attachment, enable debug mode and click on "Set Defaults" in the debug tools, traceback. The `message_attachment_count` field is a special view added by the chatter on the form view. This field exists on the view but is absent on the list of field listed by the XML file. Setting a default value on that special field is not supported. opw-1972372 closes odoo/odoo#33044 Signed-off-by: Alexandre Kühn (aku) --- addons/web/static/src/js/tools/debug_manager.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'addons/web/static/src/js/tools/debug_manager.js') diff --git a/addons/web/static/src/js/tools/debug_manager.js b/addons/web/static/src/js/tools/debug_manager.js index e4134d18afc..af2067bebaf 100644 --- a/addons/web/static/src/js/tools/debug_manager.js +++ b/addons/web/static/src/js/tools/debug_manager.js @@ -433,6 +433,7 @@ DebugManager.include({ var fields = state.fields; var fieldsInfo = state.fieldsInfo.form; var fieldNamesInView = state.getFieldNames(); + var fieldNamesOnlyOnView = ['message_attachment_count']; var fieldsValues = state.data; var modifierDatas = {}; _.each(fieldNamesInView, function (fieldName) { @@ -441,6 +442,7 @@ DebugManager.include({ }); }); this.fields = _.chain(fieldNamesInView) + .difference(fieldNamesOnlyOnView) .map(function (fieldName) { var modifierData = modifierDatas[fieldName]; var invisibleOrReadOnly; -- cgit v1.2.3