});
}
else {
- $('<div>').dialog({
- modal: true,
- title: 'Import Successful!',
- buttons: {
- Ok: function() {
- $(this).dialog("close");
- window.location = "/";
+ new instance.web.Dialog(this,{
+ title: 'Import Successful!',
+ buttons: {
+ Ok: function() {
+ this.parents('.modal').modal('hide');
+ window.location = "/";
+ }
}
- }
- }).html(_t('The document has been successfully imported!'));
+ },$('<div>').html(_t('The document has been successfully imported!'))).open();
}
},
on_imported_error: function(response){
msg += "\n " + _t("Reason:") + response.data.message;
}
var params = {error: response, message: msg};
- $(instance.web.qweb.render("CrashManager.warning", params)).dialog({
- title: _t("Document Import Notification"),
- modal: true,
- buttons: {
- Ok: function() { $(this).dialog("close"); }
- }
- });
+ new instance.web.Dialog(this,{
+ title: _t("Document Import Notification"),
+ buttons: {
+ Ok: function() { this.parents('.modal').modal('hide');}
+ }
+ },$(instance.web.qweb.render("CrashManager.warning", params))).open();
}
});
if definition.computation_mode == 'sum':
field_name = definition.field_id.name
- res = obj.read_group(cr, uid, domain, [field_name], [field_name], context=context)
+ # TODO for master: group on user field in batch mode
+ res = obj.read_group(cr, uid, domain, [field_name], [], context=context)
new_value = res and res[0][field_name] or 0.0
else: # computation mode = count
});
var am = instance.webclient.action_manager;
var form = am.dialog_widget.views.form.controller;
- form.on("on_button_cancel", am.dialog, am.dialog.close);
+ form.on("on_button_cancel", am.dialog, function() { return am.dialog.$dialog_box.modal('hide'); });
form.on('record_saved', self, function() {
- am.dialog.close();
+ am.dialog.$dialog_box.modal('hide');
self.view.do_reload();
});
},
fetched_data = cr.dictfetchall()
if not groupby_fields:
- return {r.pop('id'): r for r in fetched_data}
+ return fetched_data
many2onefields = [gb['field'] for gb in annotated_groupbys if gb['type'] == 'many2one']
if many2onefields: