summaryrefslogtreecommitdiff
path: root/addons/pad/static/src/js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-07-26 11:27:11 +0200
committerGéry Debongnie <ged@odoo.com>2017-07-27 11:34:04 +0200
commit72ed3a153a1f4c718fee33ac8550298e8a29f6cd (patch)
treecdc06e861ab8ad9a0c221f8ea6ba1093e857f295 /addons/pad/static/src/js
parent3d6420d4b3f062f12d7c18d7d9a976e2299b3444 (diff)
[FIX] web,pad: record is not considered dirty when pad is loaded
The pad widget does something unconventional: it creates the pad url only when rendering in edit mode. This was done to prevent creating pad by default for record in readonly mode. Because of that, if the user clicks on create, then discard, the record was considered dirty, so a confirmation modal popped up. In this commit, we just make sure that the initial setValue from the rendering does not 'dirty' the record.
Diffstat (limited to 'addons/pad/static/src/js')
-rw-r--r--addons/pad/static/src/js/pad.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js
index 9637072274e..b59f3f0bc04 100644
--- a/addons/pad/static/src/js/pad.js
+++ b/addons/pad/static/src/js/pad.js
@@ -111,7 +111,7 @@ var FieldPad = AbstractField.extend({
// We need to write the url of the pad to trigger
// the write function which updates the actual value
// of the field to the value of the pad content
- self._setValue(result.url);
+ self._setValue(result.url, {doNotSetDirty: true});
});
}
},