From 4e5d92da90004fdfa1307bc14fd8b19635326b68 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Wed, 6 Dec 2023 19:52:54 +0100 Subject: [PATCH] Add sao_document_field.diff --- sao_document_field.diff | 35 +++++++++++++++++++++++++++++++++++ series | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 sao_document_field.diff diff --git a/sao_document_field.diff b/sao_document_field.diff new file mode 100644 index 0000000..be04dcc --- /dev/null +++ b/sao_document_field.diff @@ -0,0 +1,35 @@ +--- a/sao/src/view/form.js ++++ b/sao/src/view/form.js +@@ -4415,15 +4418,20 @@ function eval_pyson(value){ + this.el = jQuery('
', { + 'class': this.class_, + }); +- ++ this.object = null; ++ }, ++ create_object: function() { ++ if (this.object) { ++ this.object.remove(); ++ } + this.object = jQuery('', { + 'class': 'center-block', + }).appendTo(this.el); +- if (attributes.height) { +- this.object.css('height', parseInt(attributes.height, 10)); ++ if (this.attributes.height) { ++ this.object.css('height', parseInt(this.attributes.height, 10)); + } +- if (attributes.width) { +- this.object.css('width', parseInt(attributes.width, 10)); ++ if (this.attributes.width) { ++ this.object.css('width', parseInt(this.attributes.width, 10)); + } + }, + display: function() { +@@ -4456,6 +4464,7 @@ function eval_pyson(value){ + }); + url = window.URL.createObjectURL(blob); + } ++ this.create_object(); + this.object.attr('data', url); + this.object.get(0).onload = function() { diff --git a/series b/series index e780e0c..55730c9 100644 --- a/series +++ b/series @@ -59,3 +59,5 @@ issue12678.diff # [account_statement] Not delete statement lines when statament account_statement_second_currency.diff # [account_statement] Support second currency on statement line update_trees_chart_accounts.diff # [account_account] Update trees of chart of accounts with 2 passes + +sao_document_field.diff # [sao] fix issue with loading of 'document' fields in sao