[IMP] crm: Added stages by default for a new crm.team
Now we'll have 'New', 'Qualified', 'Proposition' and 'Won' which is folded
This commit is contained in:
@@ -19,6 +19,22 @@ class crm_team(osv.Model):
|
||||
'fold': False,
|
||||
'type': 'both',
|
||||
}),
|
||||
(0, 0, {
|
||||
'name': _('Qualified'),
|
||||
'sequence': 2,
|
||||
'probability': 30.0,
|
||||
'on_change': True,
|
||||
'fold': False,
|
||||
'type': 'opportunity',
|
||||
}),
|
||||
(0, 0, {
|
||||
'name': _('Proposition'),
|
||||
'sequence': 3,
|
||||
'probability': 70.0,
|
||||
'on_change': True,
|
||||
'fold': False,
|
||||
'type': 'opportunity',
|
||||
}),
|
||||
(0, 0, {
|
||||
'name': _('Won'),
|
||||
'sequence': 50,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
I check default stage of lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
stage = self.pool.get('crm.stage').search_read(cr, uid, [], ['id'], context)[0]
|
||||
stage = self.pool.get('crm.stage').search_read(cr, uid, [('team_ids', '=', ref('sales_team.team_sales_department'))], ['id'], context=context)[0]
|
||||
lead = self.browse(cr, uid, ref('test_crm_lead_new'))
|
||||
assert lead.stage_id.id == stage['id'], "Default stage of lead is incorrect!"
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user