CRM Phonecall: convert opportunit useless code
Closed this issue · 6 comments
voronind commented
In crm_phonecall
module there is code in models/crm_phonecall.py
that do nothing. v10-13
@api.multi
def convert_opportunity(self, opportunity_summary=False, partner_id=False,
planned_revenue=0.0, probability=0.0):
partner = self.env['res.partner']
# ...
default_contact = False
for call in self:
if not partner_id:
partner_id = call.partner_id.id or False
if partner_id:
address_id = partner.address_get().get('contact', False)
# We need this here?
# address_id = partner.browse(partner_id).address_get().get('contact', False)
if address_id:
default_contact = address_id.id
# We need this here?
# default_contact = partner.browse(address_id) here?
# using default_contact
pedrobaeza commented
Why do you say it's doing nothing?
voronind commented
Why do you say it's doing nothing?
partner.address_get()
always returns {'contact': False}
. default_contact
is always False
.
pedrobaeza commented
I don't think so. It depends on your contacts data.
voronind commented
`partner` is empty recordset
ср, 28 окт. 2020 г. в 11:44, Pedro M. Baeza <notifications@github.com>:
… I don't think so. It depends on your contacts data.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#362 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMBIUVFNSPW5OKTGP5GPQTSM7DVXANCNFSM4TBAYGOQ>
.
pedrobaeza commented
OK, then do a PR changing the code to make sense.
github-actions commented
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.