_inherit = 'crm.lead2partner'
_columns = {
- 'action': fields.selection([('exist', 'Link to an existing customer'), \
- ('create', 'Create a new customer'), \
- ('nothing', 'Do not link to a customer')], \
- 'Related Customer', required=True),
- 'name': fields.selection([('convert', 'Convert to opportunity'), \
- ('merge', 'Merge with existing opportunities')], \
- 'Conversion Action', required=True),
+ 'action': fields.selection([
+ ('exist', 'Link to an existing customer'),
+ ('create', 'Create a new customer'),
+ ('nothing', 'Do not link to a customer')
+ ], 'Related Customer', required=True),
+ 'name': fields.selection([
+ ('convert', 'Convert to opportunity'),
+ ('merge', 'Merge with existing opportunities')
+ ], 'Conversion Action', required=True),
'opportunity_ids': fields.many2many('crm.lead', string='Opportunities', domain=[('type', '=', 'opportunity')]),
}
_description = 'Lead to Partner'
_columns = {
- 'action': fields.selection([('exist', 'Link to an existing customer'), \
- ('create', 'Create a new customer')], \
- 'Action', required=True),
+ 'action': fields.selection([
+ ('exist', 'Link to an existing customer'),
+ ('create', 'Create a new customer')
+ ], 'Related Customer', required=True),
'partner_id': fields.many2one('res.partner', 'Customer'),
}
+
def view_init(self, cr, uid, fields, context=None):
"""
Check for precondition before wizard executes.