[IMP] Finally allow to call set() with 2 arguments.

bzr revid: nicolas.vanhoren@openerp.com-20121018141607-jpow2bu1dlvdriyd
This commit is contained in:
niv-openerp 2012-10-18 16:16:07 +02:00
parent d5e8e627cb
commit 77415e7f77
1 changed files with 11 additions and 2 deletions

View File

@ -393,8 +393,17 @@ instance.web.PropertiesMixin = _.extend({}, instance.web.EventDispatcherMixin, {
instance.web.EventDispatcherMixin.init.call(this);
this.__getterSetterInternalMap = {};
},
set: function(map, options) {
options = options || {};
set: function(arg1, arg2, arg3) {
var map;
var options;
if (typeof arg1 === "string") {
map = {};
map[arg1] = arg2;
options = arg3 || {};
} else {
map = arg1;
options = arg2 || {};
}
var self = this;
var changed = false;
_.each(map, function(val, key) {