2 Customer requests a claim after the sale of our product. He sends claim request by email.
4 Mail script will be fetched him request from mail server. so I process that mail after read EML file
6 !python {model: mail.thread}: |
7 request_file = open(openerp.modules.module.get_module_resource('crm_claim','test', 'customer_claim.eml'),'rb')
8 request_message = request_file.read()
9 self.message_process(cr, uid, 'crm.claim', request_message)
11 After getting the mail, I check details of new claim of that customer.
13 !python {model: crm.claim}: |
14 from openerp import tools
15 claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
16 assert claim_ids and len(claim_ids), "Claim is not created after getting request"
17 claim = self.browse(cr, uid, claim_ids[0], context=context)
18 assert claim.name == tools.ustr("demande derèglement de votre produit."), "Subject does not match"
20 I open customer claim.
22 !python {model: crm.claim}: |
23 claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
25 I check Claim Details after open.
27 !python {model: crm.claim}: |
28 claim_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
29 claim = self.browse(cr, uid, claim_ids[0])