[MERGE] merge with lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa-mail-subtype-fka-crm_yml-rma

bzr revid: fka@tinyerp.com-20120820090259-xfyz9m97fj9q89jo
This commit is contained in:
Foram Katharotiya (OpenERP)
2012-08-20 14:32:59 +05:30
2 changed files with 50 additions and 1 deletions
+2 -1
View File
@@ -129,7 +129,8 @@ Creates a dashboard for CRM that includes:
'test/process/segmentation.yml',
'test/ui/crm_demo.yml',
'test/ui/duplicate_lead.yml',
'test/ui/delete_lead.yml'
'test/ui/delete_lead.yml',
'test/process/crm_message_subtype.yml',
],
'installable': True,
'application': True,
@@ -0,0 +1,48 @@
-
I have add the sub_type name other with default false
-
!record {model: mail.message.subtype, id: mail_subtype_lead_won }:
name: won
model_ids:
- crm.model_crm_lead
default: False
-
I have add the sub_type name email with default true
-
!record {model: mail.message.subtype, id: mail_subtype_lead_email }:
name: email
model_ids:
- crm.model_crm_lead
default: True
-
I have add the sub_type name comment with default true
-
!record {model: mail.message.subtype, id: mail_subtype_lead_comment }:
name: comment
model_ids:
- crm.model_crm_lead
default: True
-
I have add the subtypes as won in feeds
-
!python {model: mail.followers}: |
ids = self.search(cr, uid, [('res_model', '=', 'crm.lead'),('res_id', '=', ref('crm_case_1'))])
self.write(cr, uid, ids, {'subtype_ids': [(6,0,[ref('mail_subtype_lead_won')])]})
-
I have change the lead into mark won
-
!python {model: crm.lead}: |
self.convert_opportunity(cr, uid ,[ref("crm_case_1")], ref("base.res_partner_4"))
self.case_mark_won(cr, uid,[ref("crm_case_1")] )
-
I have check the lead into mark won
-
!assert {model: crm.lead, id: crm_case_1 ,string: 'The record is not in won state'}:
- state == 'done'
-
I have check the subtype as won in feeds
-
!python {model: mail.followers}: |
followers_ids =self.search(cr, uid, [('res_model', '=','crm.lead'),('res_id', '=', ref('crm_case_1')),('subtype_ids', 'in',[ref('mail_subtype_lead_won')])])
if len(followers_ids):
assert followers_ids, 'lead is in won'