2 Customer has Questions regarding our service. so He sent questions list 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}: |
8 request_file = open(addons.get_module_resource('crm_helpdesk','test', 'customer_question.eml'),'rb')
9 request_message = request_file.read()
10 self.message_process(cr, uid, 'crm.helpdesk', request_message)
12 After getting the mail, I check details of new question of that customer.
14 !python {model: crm.helpdesk}: |
15 from openerp import tools
16 question_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
17 assert question_ids and len(question_ids), "Question is not created after getting request"
18 question = self.browse(cr, uid, question_ids[0], context=context)
19 assert question.name == tools.ustr("Where is download link of user manual of your product ? "), "Subject does not match"
21 Now I Update message according to provide services.
23 !python {model: crm.helpdesk}: |
24 question_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
26 self.message_update(cr, uid, question_ids, {'subject': 'Link of product', 'body': 'www.openerp.com'})