[FIX] website_mail: internal mail messages

The portal user and the public user don't have to see the internal mail messages
linked to a quotation.

opw:672373
This commit is contained in:
Goffin Simon
2016-03-30 11:30:14 +02:00
parent 69fa2d5662
commit 1b5c2ced45
+5 -1
View File
@@ -67,7 +67,11 @@
</section>
<div class="clearfix"/>
<ul class="media-list o_website_comments">
<t t-foreach="object.message_ids" t-as="message">
<t t-set="messages" t-value="object.message_ids"/>
<t groups="base.group_portal,base.group_public">
<t t-set="messages" t-value="object.message_ids.filtered(lambda m: m.subtype_id.internal == False)"/>
</t>
<t t-foreach="messages" t-as="message">
<t t-if="message.website_published or website.env.user.sudo(website.env.user.id).has_group('base.group_website_publisher')">
<li class="media" t-if="message.message_type == 'comment'" t-att-id="'message-%s' % message.id">
<div class="media-body">