[IMP] mail follower: don't display invite button if the user don't have write access. Use many2many_tags_email widget on composer
bzr revid: chm@openerp.com-20121221102649-xyecgj5tqd3li3hw
This commit is contained in:
parent
9df82da7c0
commit
d36ef41a46
|
@ -34,6 +34,8 @@ openerp_mail_followers = function(session, mail) {
|
|||
|
||||
this.value = [];
|
||||
this.followers = [];
|
||||
|
||||
this.view_is_editable = this.__parentedParent.is_action_enabled('edit');
|
||||
},
|
||||
|
||||
start: function() {
|
||||
|
@ -43,7 +45,6 @@ openerp_mail_followers = function(session, mail) {
|
|||
this.reinit();
|
||||
this.bind_events();
|
||||
this._super();
|
||||
this.view_is_editable = this.__parentedParent.is_action_enabled('edit');
|
||||
},
|
||||
|
||||
on_check_visibility_mode: function () {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</t>
|
||||
<div class='oe_follower_title_box'>
|
||||
<h4 class='oe_follower_title'>Followers</h4>
|
||||
<a href='#' class="oe_invite">Invite others</a>
|
||||
<a t-if="widget.view_is_editable" href='#' class="oe_invite">Invite others</a>
|
||||
</div>
|
||||
<div class="oe_follower_list"></div>
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
<group>
|
||||
<field name="res_model" invisible="1"/>
|
||||
<field name="res_id" invisible="1"/>
|
||||
<field name="partner_ids" widget="many2many_tags"
|
||||
on_change="onchange_partner_ids(partner_ids)" />
|
||||
<field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."
|
||||
context="{'force_email':True}"/>
|
||||
<field name="message"/>
|
||||
</group>
|
||||
<footer>
|
||||
|
|
Loading…
Reference in New Issue