[FIX] crm_partner_assign: custom next client is not anymore usefull, cases where the record was no more readable after write (due to security changes) are now handled by the web client

bzr revid: dle@openerp.com-20140326154738-jocgzfjpiucdfxki
This commit is contained in:
Denis Ledoux 2014-03-26 16:47:38 +01:00
parent 7acaaf5894
commit ebb14f776a
2 changed files with 1 additions and 23 deletions

View File

@ -1,19 +0,0 @@
openerp.crm_partner_assign = function (instance) {
instance.crm_partner_assign = instance.crm_partner_assign || {};
instance.crm_partner_assign.next_or_list = function(parent) {
var view = parent.inner_widget.active_view;
var controller = parent.inner_widget.views[view].controller;
if (view === "form"){
if (controller.dataset.size()) {
controller.execute_pager_action('next');
} else {
controller.do_action('history_back');
}
}
controller.do_action({ type: 'ir.actions.act_window_close' });
if (view === "list"){
controller.records.remove(controller.records.get(parent.dialog_widget.action.context.active_id));
}
};
instance.web.client_actions.add("next_or_list", "instance.crm_partner_assign.next_or_list");
}

View File

@ -70,8 +70,5 @@ class crm_lead_forward_to_partner(osv.TransientModel):
for lead in lead_obj.browse(cr, uid, context.get('active_ids', []), context=context):
lead_obj.convert_opportunity(cr, SUPERUSER_ID, [lead.id], lead.partner_id and lead.partner_id.id or None, context=None)
return {
'type': 'ir.actions.client',
'tag': 'next_or_list',
'params': {
},
'type': 'ir.actions.act_window_close',
}