2 In order to test the Idea module in OpenERP,
3 we will create a full flow, from the idea definition up to the votes and discussions on the idea.
5 Given that I have an Idea category "Technical".
7 !record {model: idea.category, id: idea_category_technical0}:
10 I create a New Idea of "Technical presentation for 1 hours in every day" and specify category "Technical".
12 !record {model: idea.idea, id: idea_idea_0}:
13 category_id: idea_category_technical0
14 created_date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
15 description: I want that Technical presentation are arranged for 1 hours in every
16 day.\nso, on that presentation, we can know all things what improvement and development
17 are done in our company.\n\n\n\n\n
18 name: Technical presentation for 1 hours in every day
19 user_id: base.user_root
22 I check that the idea is in draft state.
24 !assert {model: idea.idea, id: idea_idea_0}:
28 I open this idea by clicking on the "Open" button.
30 !workflow {model: idea.idea, action: idea_open, ref: idea_idea_0}
33 In order to check voting statistics in real systems I will create 2 new Users "test_idea_user1".
35 !record {model: res.users, id: test_idea_user1}:
36 company_id: base.main_company
38 login: test_idea_user1
40 password: test_idea_user1
41 groups_id: [ base.group_tool_user, ]
43 And I will also create user2.
45 !record {model: res.users, id: test_idea_user2}:
46 company_id: base.main_company
48 login: test_idea_user2
50 password: test_idea_user2
51 groups_id: [ base.group_tool_user, ]
53 In order to post vote I connect as test_idea_user1 and open the idea page
54 I click on "Submit Vote" wizard button and vote the idea as "Normal"
57 !python {model: idea.post.vote}: |
58 uid2 = ref('test_idea_user1')
59 new_id = self.create(cr, uid2, {'vote': 50}, {"active_ids": [ref("idea_idea_0")]})
60 self.do_vote(cr, uid2, [new_id], {"active_ids": [ref("idea_idea_0")]})
63 To add other vote I connect as test_idea_user2 and open the idea page.
65 I click on "Submit Vote" wizard button and vote the idea as "Very Good".
67 and put comment "We can learn many things from technical presentation".
70 !python {model: idea.post.vote}: |
71 uid2 = ref('test_idea_user2')
72 new_id = self.create(cr, uid2, {'vote': 100, 'note': 'We can learn many things from technical presentation'}, {"active_ids": [ref("idea_idea_0")]})
73 self.do_vote(cr, uid2, [new_id], {'active_ids': [ref('idea_idea_0')]})
76 I can see that the Average score changed in "Average score" field with value 75
78 !record {model: idea.idea, id: idea_idea_0}:
82 I connect as Manager and close this idea by click on "Close" button.
84 !workflow {model: idea.idea, action: idea_close, ref: idea_idea_0}
87 I check that the idea's state is now Accepted
89 !assert {model: idea.idea, id: idea_idea_0}: