[REM] completion in Gantt chart tasks and projects, not supported by OpenERP and...
[odoo/odoo.git] / addons / project_issue / test / issue_process.yml
1 -
2   In order to test process of issue tracking in OpenERP, I Open the Issue.
3 -
4   !python {model: project.issue}: |
5     self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")])
6
7   I check state of Issue after opened it.
8
9   !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in open state}:
10     - state == 'open'       
11
12   Now I put Issue in pending due to need more information.
13
14   !python {model: project.issue}: |
15     self.case_pending(cr, uid, [ref("crm_case_buginaccountsmodule0")])
16
17   I check state after put in pending.
18 -  
19   !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in pending state}:
20     - state == 'pending'
21 -
22   I send mail to get more details.
23 -
24   !python {model: mail.compose.message }: |
25     ctx = context.copy()
26     ctx.update({'active_model': 'project.issue', 'active_id': ref("crm_case_buginaccountsmodule0"), 'active_ids': [ref("crm_case_buginaccountsmodule0")]})
27     vals = self.default_get(cr, uid , [], context=ctx)
28     try:
29         new_id = self.create(cr, uid, {'email_from': 'support@mycompany.com','email_to': 'Robert_Adersen@yahoo.com', 'subject': 'Regarding error in account module we nees more details'})
30         self.send_mail(cr, uid, [new_id], context=ctx)
31     except Exception, e:
32         pass  
33 -
34   After getting sufficient details, I re-open Issue from pending state.
35 -
36   !python {model: project.issue}: |
37     self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")])
38 -
39   I check state of Issue after re-opened.
40 -
41   !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in open state}:
42     - state == 'open'   
43 -
44   I create Task for Issue.
45 -
46   !python {model: project.issue}: |
47     self.convert_issue_task(cr, uid, [ref("crm_case_buginaccountsmodule0")])
48 -
49   I close Issue after resolving it
50 -
51   !python {model: project.issue}: |
52     self.case_close(cr, uid, [ref("crm_case_buginaccountsmodule0")])
53 -  
54   I Check state of Issue after closed.
55
56   !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in done state}:
57     - state == 'done'