'Extract the data from a lead to create the opportunity
:param customer : res.partner record
:param team_id : identifier of the sales team to determine the stage'

@api.multi
def _convert_opportunity_data(self, customer, team_id=False):

    if (not team_id):
        team_id = (self.team_id.id if self.team_id else False)
    value = {'planned_revenue': self.planned_revenue, 'probability': self.probability, 'name': self.name, 'partner_id': (customer.id if customer else False), 'type': 'opportunity', 'date_open': fields.Datetime.now(), 'email_from': ((customer and customer.email) or self.email_from), 'phone': ((customer and customer.phone) or self.phone), 'date_conversion': fields.Datetime.now()}
    if (not self.stage_id):
        stage = self._stage_find(team_id=team_id)
        value['stage_id'] = stage.id
        if stage:
            value['probability'] = stage.probability
    return value
