[FIX]: fix a problem for the idea test scenario, also change a comment method

bzr revid: mga@tinyerp.com-20100518140901-amke1lt2nbdvak4n
This commit is contained in:
Mantavya Gajjar 2010-05-18 19:39:01 +05:30
parent 552e56963d
commit 6437a3302a
3 changed files with 15 additions and 10 deletions

View File

@ -45,7 +45,9 @@
'demo_xml': [
"idea_data.xml"
],
'test':['test/test_idea.yml'],
'test':[
'test/test_idea.yml'
],
'installable': True,
'certificate': '0071515601309',
}

View File

@ -87,9 +87,10 @@
-
!record {model: idea.idea, id: idea.idea_idea_0}:
comment_ids:
- content: We can learn many things from technical presentation
- content: "We can learn many things from technical presentation"
idea_id: idea.idea_idea_0
user_id: res_users_user1
- |
I connect as Manager and close this idea by click on "Close" button.
-
@ -100,4 +101,4 @@
-
!assert {model: idea.idea, id: idea_idea_0}:
- state == 'close'

View File

@ -93,19 +93,21 @@ class idea_post_vote(osv.osv_memory):
for do_vote_obj in self.read(cr, uid, ids):
score = str(do_vote_obj['vote'])
comment = do_vote_obj['note']
comment = do_vote_obj.get('note', False)
vote = {
'idea_id': vote_id,
'user_id': uid,
'score': score
}
comment = {
'user_id':uid,
'idea_id':vote_id,
'content': comment,
}
if comment:
comment = {
'user_id':uid,
'idea_id':vote_id,
'content': comment,
}
comment = comment_pool.create(cr, uid, comment)
vote = vote_pool.create(cr, uid, vote)
comment = comment_pool.create(cr, uid, comment)
return {}
idea_post_vote()