From b2df3c7f30ee9ad488357125fc39ebc3cb7fab35 Mon Sep 17 00:00:00 2001 From: Priyanka Kakadiya Date: Mon, 1 Apr 2019 09:21:36 +0000 Subject: [FIX] web: removed extra space from graph - when refresh a kanban dashboard page which contains graph, there is some extra div appends to the graph. - so if svg is there in the dom, no need to append it again. simply use the existing svg Related to Issue: 1943483 closes odoo/odoo#32279 Signed-off-by: VincentSchippefilt --- addons/web/static/src/js/fields/basic_fields.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/fields/basic_fields.js') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index ad818146a21..93e044663a8 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -2582,7 +2582,7 @@ var JournalDashboardGraph = AbstractField.extend({ this.$el.empty(); this.chart = null; nv.addGraph(function () { - self.$svg = self.$el.append(''); + self.$svg = self.$el.find('svg').length ? self.$el.find('svg') : self.$el.append(''); switch (self.graph_type) { case "line": self.$svg.addClass('o_graph_linechart'); -- cgit v1.2.3 From d7d7d92e92aa4bc5d81c77b41c8e41f4ee479777 Mon Sep 17 00:00:00 2001 From: Julien Mougenot Date: Fri, 24 May 2019 10:16:46 +0000 Subject: [FIX] web: binary fields correctly resets When uploading a file to a binary file, then clicking on the "clear" button, then reuploading the same file... Before this commit: The actual input of the field was only changed on user input. This means that the "clear" action didn't reset the actual value of the input, and the browser's default behaviour when getting the same path twice is not to change anything. In the use case, you couldn't upload the same file until you uploaded another one. After this commit: The "clear" action now also clears the value, allowing reuploading the same file over again. closes odoo/odoo#33843 Signed-off-by: VincentSchippefilt --- addons/web/static/src/js/fields/basic_fields.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web/static/src/js/fields/basic_fields.js') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index fd156f2d00b..97f3c056c5d 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -1228,6 +1228,7 @@ var AbstractFieldBinary = AbstractField.extend({ } }, on_clear: function () { + this.$('.o_input_file').val(''); this.set_filename(''); this._setValue(false); this._render(); -- cgit v1.2.3