diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-02-25 14:02:20 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2016-03-14 10:14:16 +0100 |
| commit | feeac2a4f1cd777770dd2b42534904ac71f23e46 (patch) | |
| tree | 60a116265f5e51f3ec6790001ade5a5d6b3f440a /addons/web_editor/static/src/js/backend.js | |
| parent | bbbf3db581b5cf883e10fa9cf9e2b1727f725669 (diff) | |
[FIX] web: various small issues in form view onchange/one2many
- Issue: Edit sale.order form view, add new line, change product who have
taxes and click quickly on save (with slow network) => error message.
Because some deferreds are lost.
- reduce number of reads and onchange for x2m widgets
- remove before_save method and use commit_value (the issue was that if the
before_save and the change trigger an onchange, the onchange deferred is not
checked before saving the content.
Diffstat (limited to 'addons/web_editor/static/src/js/backend.js')
| -rw-r--r-- | addons/web_editor/static/src/js/backend.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js index 2a33cdd4758..fa962cfd75f 100644 --- a/addons/web_editor/static/src/js/backend.js +++ b/addons/web_editor/static/src/js/backend.js @@ -155,7 +155,7 @@ var FieldTextHtmlSimple = widget.extend({ is_false: function() { return !this.get('value') || this.get('value') === "<p><br/></p>" || !this.get('value').match(/\S/); }, - before_save: function() { + commit_value: function() { if (this.options['style-inline']) { transcoder.class_to_style(this.$content); transcoder.font_to_img(this.$content); @@ -361,7 +361,7 @@ var FieldTextHtml = widget.extend({ is_false: function() { return this.get('value') === false || !this.$content.html() || !this.$content.html().match(/\S/); }, - before_save: function () { + commit_value: function () { if (this.lang !== 'en_US' && this.$body.find('.o_dirty').length) { this.internal_set_value( this.view.datarecord[this.name] ); this._dirty_flag = false; |
