[IMP] small refactoring in javascript due to modifications to error messages in jsonrpc
bzr revid: nicolas.vanhoren@openerp.com-20130130154229-z0adpacyspmnl1vu
This commit is contained in:
parent
4a4282c245
commit
4cd744d3f8
|
@ -63,8 +63,8 @@ instance.edi.EdiImport = instance.web.Widget.extend({
|
||||||
on_imported_error: function(response){
|
on_imported_error: function(response){
|
||||||
var self = this;
|
var self = this;
|
||||||
var msg = _t("Sorry, the document could not be imported.");
|
var msg = _t("Sorry, the document could not be imported.");
|
||||||
if (response.data.fault_code) {
|
if (response.data.message) {
|
||||||
msg += "\n " + _t("Reason:") + response.data.fault_code;
|
msg += "\n " + _t("Reason:") + response.data.message;
|
||||||
}
|
}
|
||||||
var params = {error: response, message: msg};
|
var params = {error: response, message: msg};
|
||||||
$(instance.web.qweb.render("CrashManager.warning", params)).dialog({
|
$(instance.web.qweb.render("CrashManager.warning", params)).dialog({
|
||||||
|
|
|
@ -227,7 +227,7 @@ openerp.web_analytics = function(instance) {
|
||||||
if (error.code) {
|
if (error.code) {
|
||||||
t._push_event({
|
t._push_event({
|
||||||
'category': error.message,
|
'category': error.message,
|
||||||
'action': error.data.fault_code,
|
'action': error.data.message,
|
||||||
'label': url,
|
'label': url,
|
||||||
'noninteraction': true,
|
'noninteraction': true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue