Browse Source

web_warning_sound change on_processed_onchange method so that it doesn't break inheritance chain

pull/36/head
Kiril Vangelovski 10 years ago
parent
commit
ebc7939398
  1. 24
      web_warning_sound/static/src/js/sound_extend.js

24
web_warning_sound/static/src/js/sound_extend.js

@ -9,32 +9,10 @@ openerp.web_warning_sound = function(instance) {
var audio = new Audio(result.sound);
audio.play();
}
if (result.value) {
this._internal_set_values(result.value, processed);
}
if (!_.isEmpty(result.warning)) {
instance.web.dialog($(QWeb.render("CrashManager.warning", result.warning)), {
title:result.warning.title,
modal: true,
buttons: [
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
]
});
}
var fields = this.fields;
_(result.domain).each(function (domain, fieldname) {
var field = fields[fieldname];
if (!field) { return; }
field.node.attrs.domain = domain;
});
return $.Deferred().resolve();
} catch(e) {
console.error(e);
instance.webclient.crashmanager.show_message(e);
return $.Deferred().reject();
}
return this._super.apply(this, arguments);
},
});

Loading…
Cancel
Save