[MRG] lp:~openerp-dev/openobject-addons/trunk-website-forum-tpa-template_ans-ssh improved code to make notifications as unread.
bzr revid: tpa@tinyerp.com-20140326065303-1eb4p8s1ni4n5t10
This commit is contained in:
commit
b6db9be4f1
|
@ -1,8 +1,17 @@
|
|||
|
||||
-
|
||||
Admin User Edit a Question asked by demo user to improve typo
|
||||
Admin User Edit a Question asked by demo user to improve typo
|
||||
-
|
||||
!python {model: website.forum.post}: |
|
||||
self.write(cr, ref('base.user_root'), [ref('website_forum.question_5')],{
|
||||
'name': 'CMS Replacement For ERP and ECommerce ?',
|
||||
})
|
||||
})
|
||||
|
||||
-
|
||||
Make mail notifications as read for assigned badges.
|
||||
-
|
||||
!python {model: mail.message}: |
|
||||
notificaton_obj = self.pool.get('mail.notification')
|
||||
bedge_user_ids = self.pool.get("gamification.badge.user").search(cr, uid, [('user_id','in', [ref('base.user_demo'),ref('base.user_root')]),('badge_id', 'in', [ref('badge_5')])], context=context)
|
||||
message_ids = self.search(cr, uid, [('res_id', 'not in', bedge_user_ids),('model', '=', 'gamification.badge.user')], context=context)
|
||||
notify_ids = notificaton_obj.search(cr, uid, [('message_id', 'in', message_ids)], context=context)
|
||||
notificaton_obj.write(cr, uid, notify_ids ,{ 'read': True })
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
|
||||
access_website_forum,website.forum,model_website_forum,base.group_public,1,0,0,0
|
||||
access_website_forum_post,website.forum.post,model_website_forum_post,base.group_public,1,0,0,0
|
||||
access_website_forum_post_history,website.forum.post.history,model_website_forum_post_history,base.group_public,1,0,0,0
|
||||
access_website_forum_post_vote,website.forum.post.vote,model_website_forum_post_vote,base.group_public,1,0,0,0
|
||||
access_website_forum_post_reason,website.forum.post.reason,model_website_forum_post_reason,base.group_public,1,0,0,0
|
||||
access_website_forum_post_statistics,website.forum.post.statistics,model_website_forum_post_statistics,base.group_public,1,0,0,0
|
||||
access_website_forum_tag,website.forum.tag,model_website_forum_tag,base.group_public,1,0,0,0
|
||||
access_gamification_badge_user,gamification.badge.user,gamification.model_gamification_badge_user,base.group_public,1,0,0,0
|
||||
access_gamification_badge,gamification_badge,gamification.model_gamification_badge,base.group_public,1,0,0,0
|
||||
,,,,,,,
|
||||
access_website_forum,website.forum,model_website_forum,,1,0,0,0
|
||||
access_website_forum_post,website.forum.post,model_website_forum_post,,1,0,0,0
|
||||
access_website_forum_post_history,website.forum.post.history,model_website_forum_post_history,,1,0,0,0
|
||||
access_website_forum_post_vote,website.forum.post.vote,model_website_forum_post_vote,,1,0,0,0
|
||||
access_website_forum_post_reason,website.forum.post.reason,model_website_forum_post_reason,,1,0,0,0
|
||||
access_website_forum_post_statistics,website.forum.post.statistics,model_website_forum_post_statistics,,1,0,0,0
|
||||
access_website_forum_tag,website.forum.tag,model_website_forum_tag,,1,0,0,0
|
||||
access_gamification_badge_user,gamification.badge.user,gamification.model_gamification_badge_user,,1,0,0,0
|
||||
access_gamification_badge,gamification_badge,gamification.model_gamification_badge,,1,0,0,0
|
||||
|
|
|
|
@ -614,7 +614,7 @@
|
|||
<div class="col-md-7 mb16">
|
||||
<input type="text" class="col-md-7 mb16 form-control" name="name" required="True" t-attf-value="#{user.name or ''}"/>
|
||||
</div>
|
||||
<label class="col-md-2 control-label mb16" for="user.partner_id.website">Website</label>
|
||||
<label class="col-md-4 control-label mb16" for="user.partner_id.website">Website</label>
|
||||
<div class="col-md-7 mb16">
|
||||
<input type="text" class="form-control" name="website" t-attf-value="#{user.partner_id.website or ''}"/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue