-
!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.
-
-
!assert {model: idea.idea, id: idea_idea_0}:
- state == 'close'
-
\ No newline at end of file
+
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()