[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:
Yannick Tivisse
2015-09-02 10:18:17 +02:00
parent 26ae933544
commit 6f1e8abbc7
2 changed files with 17 additions and 1 deletions
+16
View File
@@ -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,
+1 -1
View File
@@ -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!"
-