From 97da4468fccb9fcc5ff8a6bb85161512c4d10811 Mon Sep 17 00:00:00 2001 From: "ATUL (OpenERP)" <> Date: Thu, 8 Jul 2010 15:50:32 +0530 Subject: [PATCH] [FIX] idea: yml issue bzr revid: hmo@tinyerp.com-20100708102032-prqb40disa69gy97 --- addons/idea/security/ir.model.access.csv | 1 + addons/idea/test/test_idea.yml | 23 +++++------------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/addons/idea/security/ir.model.access.csv b/addons/idea/security/ir.model.access.csv index ba3b6fe4e3f..f9f665766e1 100644 --- a/addons/idea/security/ir.model.access.csv +++ b/addons/idea/security/ir.model.access.csv @@ -5,3 +5,4 @@ "access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,0,0,0 "access_idea_category_system","idea.category system","model_idea_category","base.group_system",1,1,1,1 "access_idea_comment","idea.comment","model_idea_comment","base.group_system",1,1,1,1 +"access_idea_comment_user","idea.comment","model_idea_comment","base.group_user",1,1,1,0 diff --git a/addons/idea/test/test_idea.yml b/addons/idea/test/test_idea.yml index bcb764f8933..9646222cab4 100644 --- a/addons/idea/test/test_idea.yml +++ b/addons/idea/test/test_idea.yml @@ -44,9 +44,6 @@ !record {model: res.users, id: res_users_user1}: company_id: base.main_company context_lang: en_US - groups_id: - - base.group_system - - base.group_user login: user2 name: user2 password: user2 @@ -54,16 +51,12 @@ - | In order to post vote I connect as user1 and open the idea page I click on "Submit Vote" wizard button and vote the idea as "Normal" -- - !record {model: idea.post.vote, id: idea_post_vote_0}: - vote: 50 -- | - Now I click on "Post" button of this wizard. - !python {model: idea.post.vote}: | - uid = ref('res_users_user0') - self.do_vote(cr, uid, [ref("idea_post_vote_0")], {'active_ids': [ref('idea_idea_0')]}) + uid = ref('res_users_user0') + new_id = self.create(cr, uid, {'vote': 50}, {"active_ids": [ref("idea_idea_0")]}) + self.do_vote(cr, uid, [new_id], {"active_ids": [ref("idea_idea_0")]}) - | To add other vote I connect as user2 and open the idea page. @@ -72,16 +65,11 @@ and put comment "We can learn many things from technical presentation". -- - !record {model: idea.post.vote, id: idea_post_vote_1}: - vote: 100 - note: 'We can learn many things from technical presentation' -- | - I click on "Post" button of this wizard. - !python {model: idea.post.vote}: | uid = ref('res_users_user1') - self.do_vote(cr, uid, [ref("idea_post_vote_1")], {'active_ids': [ref('idea_idea_0')]}) + new_id = self.create(cr, uid, {'vote': 100, 'note': 'We can learn many things from technical presentation'}, {"active_ids": [ref("idea_idea_0")]}) + self.do_vote(cr, uid, [new_id], {'active_ids': [ref('idea_idea_0')]}) - | I can see that the Average score changed in "Average score" field with value 75 @@ -99,4 +87,3 @@ - !assert {model: idea.idea, id: idea_idea_0}: - state == 'close' -