2011-09-08 10:29:35 +00:00
|
|
|
-
|
2011-11-23 13:24:10 +00:00
|
|
|
Customer requests a claim after the sale of our product. He sends claim request by email.
|
2010-04-21 14:43:01 +00:00
|
|
|
-
|
2011-10-25 08:28:49 +00:00
|
|
|
Mail script will be fetched him request from mail server. so I process that mail after read EML file
|
|
|
|
-
|
|
|
|
!python {model: mail.thread}: |
|
2013-02-09 07:06:14 +00:00
|
|
|
from openerp import addons
|
2011-10-25 08:28:49 +00:00
|
|
|
request_file = open(addons.get_module_resource('crm_claim','test', 'customer_claim.eml'),'rb')
|
|
|
|
request_message = request_file.read()
|
|
|
|
self.message_process(cr, uid, 'crm.claim', request_message)
|
|
|
|
-
|
|
|
|
After getting the mail, I check details of new claim of that customer.
|
|
|
|
-
|
|
|
|
!python {model: crm.claim}: |
|
|
|
|
from openerp import tools
|
|
|
|
claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
|
|
|
|
assert claim_ids and len(claim_ids), "Claim is not created after getting request"
|
|
|
|
claim = self.browse(cr, uid, claim_ids[0], context=context)
|
|
|
|
assert claim.name == tools.ustr("demande derèglement de votre produit."), "Subject does not match"
|
|
|
|
-
|
|
|
|
I open customer claim.
|
2010-04-21 14:43:01 +00:00
|
|
|
-
|
|
|
|
!python {model: crm.claim}: |
|
2011-10-25 08:28:49 +00:00
|
|
|
claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
|
|
|
|
self.case_open(cr, uid, claim_ids)
|
|
|
|
-
|
|
|
|
I check Claim Details after open.
|
|
|
|
-
|
|
|
|
!python {model: crm.claim}: |
|
|
|
|
claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
|
|
|
|
claim = self.browse(cr, uid, claim_ids[0])
|
2011-10-18 07:13:58 +00:00
|
|
|
assert claim.state == "open", "Claim is not in Open state"
|
2012-05-15 12:59:09 +00:00
|
|
|
assert claim.stage_id.id == ref("crm.stage_lead2"), "Claim is not in Qualification stage"
|
2011-09-02 11:23:52 +00:00
|
|
|
-
|
2011-10-25 08:28:49 +00:00
|
|
|
After complete all service from our side, I close this claim.
|
|
|
|
-
|
|
|
|
!python {model: crm.claim}: |
|
|
|
|
claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
|
|
|
|
self.case_close(cr, uid, claim_ids)
|
|
|
|
-
|
2011-11-23 13:24:10 +00:00
|
|
|
I check Claim details after closed.
|
2011-09-05 08:57:00 +00:00
|
|
|
-
|
|
|
|
!python {model: crm.claim}: |
|
2011-10-25 08:28:49 +00:00
|
|
|
claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
|
|
|
|
claim = self.browse(cr, uid, claim_ids[0])
|
2011-10-18 07:13:58 +00:00
|
|
|
assert claim.state == "done", "Claim is not in close state"
|