[ADD]crm_channel: portal, Im not interested button go to next lead or to list if none
bzr revid: dle@openerp.com-20130620151805-pvjkozq41wwpfodo
This commit is contained in:
parent
c13e5b8c9a
commit
7be4614731
|
@ -52,6 +52,9 @@ You can also use the geolocalization without using the GPS coordinates.
|
|||
'report/crm_partner_report_view.xml',
|
||||
'data/lead_mail_template_data.xml',
|
||||
],
|
||||
'js': [
|
||||
'static/src/js/next.js',
|
||||
],
|
||||
'test': ['test/partner_assign.yml'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
|
|
|
@ -44,8 +44,14 @@ class crm_lead(osv.osv):
|
|||
except ValueError:
|
||||
stage_id = False
|
||||
values = {}
|
||||
# values = {'partner_assigned_id': False}
|
||||
values = {'partner_assigned_id': False}
|
||||
if stage_id:
|
||||
values['stage_id'] = stage_id
|
||||
self.write(cr, SUPERUSER_ID, ids, values, context=context)
|
||||
self.message_post(cr, uid, ids, body=_('I am not interested by this lead'), context=context)
|
||||
self.write(cr, SUPERUSER_ID, ids, values, context=context)
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'next_or_list',
|
||||
'params': {
|
||||
},
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
openerp.crm_channel = function (instance) {
|
||||
instance.crm_channel = instance.crm_channel || {};
|
||||
instance.crm_channel.next_or_list = function(parent) {
|
||||
var form = parent.inner_widget.views.form.controller;
|
||||
form.dataset.remove_ids([form.dataset.ids[form.dataset.index]]);
|
||||
form.reload();
|
||||
if (!form.dataset.ids.length){
|
||||
parent.inner_widget.switch_mode('list');
|
||||
}
|
||||
};
|
||||
instance.web.client_actions.add("next_or_list", "instance.crm_channel.next_or_list");
|
||||
}
|
Loading…
Reference in New Issue