Merge lp:~openerp-dev/openobject-addons/trunk-bug-1224879-dja into lp:openobject-addons

Proposed by Dharmraj Zala(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1224879-dja
Merge into: lp:openobject-addons
Diff against target: 49 lines (+7/-2)
2 files modified
crm/crm_phonecall.py (+2/-1)
crm/wizard/crm_phonecall_to_phonecall.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1224879-dja
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+200660@code.launchpad.net

Description of the change

Hello ,

I've fixed the issue of losing link while creating phone call from another phone call by passing opportunity_id from wizard.

Thanks,
dja

To post a comment you must log in.

Unmerged revisions

8903. By Dharmraj Zala(OpenERP)

[IMP] removed opportunity_id from view file as it is not needed

8902. By Dharmraj Zala(OpenERP)

[MERGE] with trunk

8901. By Dharmraj Zala(OpenERP)

[FIX] shcedulig call from another call won't lose link

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'crm/crm_phonecall.py'
2--- crm/crm_phonecall.py 2013-11-27 15:32:57 +0000
3+++ crm/crm_phonecall.py 2014-01-07 12:42:55 +0000
4@@ -110,7 +110,7 @@
5 return True
6
7 def schedule_another_phonecall(self, cr, uid, ids, schedule_time, call_summary, \
8- user_id=False, section_id=False, categ_id=False, action='schedule', context=None):
9+ user_id=False, section_id=False, categ_id=False, opportunity_id=False, action='schedule', context=None):
10 """
11 action :('schedule','Schedule a call'), ('log','Log a call')
12 """
13@@ -140,6 +140,7 @@
14 'partner_phone' : call.partner_phone,
15 'partner_mobile' : call.partner_mobile,
16 'priority': call.priority,
17+ 'opportunity_id': call.opportunity_id and call.opportunity_id.id or False,
18 }
19 new_id = self.create(cr, uid, vals, context=context)
20 if action == 'log':
21
22=== modified file 'crm/wizard/crm_phonecall_to_phonecall.py'
23--- crm/wizard/crm_phonecall_to_phonecall.py 2013-11-27 15:32:57 +0000
24+++ crm/wizard/crm_phonecall_to_phonecall.py 2014-01-07 12:42:55 +0000
25@@ -40,7 +40,8 @@
26 'section_id':fields.many2one('crm.case.section','Sales Team'),
27 'action': fields.selection([('schedule','Schedule a call'), ('log','Log a call')], 'Action', required=True),
28 'partner_id' : fields.many2one('res.partner', "Partner"),
29- 'note':fields.text('Note')
30+ 'note':fields.text('Note'),
31+ 'opportunity_id': fields.many2one('crm.lead','Lead/Opportunity'),
32 }
33
34
35@@ -61,6 +62,7 @@
36 this.user_id and this.user_id.id or False, \
37 this.section_id and this.section_id.id or False, \
38 this.categ_id and this.categ_id.id or False, \
39+ this.opportunity_id and this.opportunity_id.id or False, \
40 action=this.action, context=context)
41
42 return phonecall.redirect_phonecall_view(cr, uid, phocall_ids[phonecall_ids[0]], context=context)
43@@ -96,6 +98,8 @@
44 res.update({'categ_id': categ_id})
45 if 'partner_id' in fields:
46 res.update({'partner_id': phonecall.partner_id and phonecall.partner_id.id or False})
47+ if 'opportunity_id' in fields:
48+ res.update({'opportunity_id': phonecall.opportunity_id and phonecall.opportunity_id.id or False})
49 return res
50
51

Subscribers

People subscribed via source and target branches

to all changes: