summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-08-19 12:17:23 +0200
committerXavier Morel <xmo@openerp.com>2011-08-19 12:17:23 +0200
commitec9a40c8f53e02db554abdf0bbf012488d0466e9 (patch)
tree8109823d6e20c4d9ced0312295cea285e85ec93d
parent32e9a10a1e62b580d1da1e2e2c22589eccd658b9 (diff)
[IMP] add previous field value to change events
bzr revid: xmo@openerp.com-20110819101723-p73bts37knut34c8
-rw-r--r--addons/base/static/src/js/list.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/base/static/src/js/list.js b/addons/base/static/src/js/list.js
index 966f35bbdde..cee1adbdb69 100644
--- a/addons/base/static/src/js/list.js
+++ b/addons/base/static/src/js/list.js
@@ -1204,12 +1204,13 @@ var Record = openerp.base.Class.extend(/** @lends Record# */{
* @returns {Record}
*/
set: function (key, value) {
- if (this.attributes[key] === value) {
+ var old_value = this.attributes[key];
+ if (old_value === value) {
return this;
}
this.attributes[key] = value;
- this.trigger('change:' + key, this, value);
- this.trigger('change', this, key, value);
+ this.trigger('change:' + key, this, value, old_value);
+ this.trigger('change', this, key, value, old_value);
return this;
},
/**