From ba6fa116fc346ef58ee77a767dbc8e8dbb8b7724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 29 Apr 2016 23:02:36 +0200 Subject: [PATCH] Compare keyword_open to 1 It is needed to correctly test "0" as false issue5379 review23021002 --- src/board.js | 2 +- src/screen.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/board.js b/src/board.js index 78ee68e5ca..b6a235f775 100644 --- a/src/board.js +++ b/src/board.js @@ -273,7 +273,7 @@ } if (this.screen.current_view.view_type == 'tree' && - ('keyword_open' in this.screen.current_view.attributes)) { + (this.screen.current_view.attributes.keyword_open == 1)) { record_ids = this.screen.current_view.selected_records().map( function(record) { return record.id; }); Sao.Action.exec_keyword('tree_open', { diff --git a/src/screen.js b/src/screen.js index 67ba6ac245..72a4f48e35 100644 --- a/src/screen.js +++ b/src/screen.js @@ -953,7 +953,7 @@ }, default_row_activate: function() { if ((this.current_view.view_type == 'tree') && - this.current_view.attributes.keyword_open) { + (this.current_view.attributes.keyword_open == 1)) { Sao.Action.exec_keyword('tree_open', { 'model': this.model_name, 'id': this.get_id(),