Prospect modules (different approch than the OCA module partner_prospect in sale-workflow)

This commit is contained in:
Alexis de Lattre
2017-02-02 00:24:20 +01:00
parent e353cdcad1
commit b518594136
12 changed files with 285 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, api
class CrmLead(models.Model):
_inherit = 'crm.lead'
@api.multi
def _lead_create_contact(self, name, is_company, parent_id=False):
partner = super(CrmLead, self)._lead_create_contact(
name, is_company, parent_id=parent_id)
partner.write({'prospect': True, 'customer': False})
return partner