[FIX]project_issue: add onchange_partner_id which was inherited before with base_stage, but the inheritance has been removed

bzr revid: dle@openerp.com-20131017121013-mtzvjogi2hxgfcpq
This commit is contained in:
Denis Ledoux
2013-10-17 14:10:13 +02:00
parent d52f335ff9
commit d15798786a
3 changed files with 11 additions and 3 deletions
@@ -59,6 +59,10 @@
<field name="description" nolabel="1" colspan="2"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread" readonly="1"/>
</div>
</form>
</field>
</record>
@@ -145,6 +149,10 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread" readonly="1"/>
</div>
</form>
</field>
</record>
+1 -1
View File
@@ -35,7 +35,7 @@ class mail_message(osv.Model):
group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
group_user_id = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'base', 'group_user')[1]
if group_user_id not in [group.id for group in group_ids]:
args = ['&', '|', ('type', '!=', 'comment'), ('subtype_id', '!=', False)] + list(args)
args = [('subtype_id', '!=', False)] + list(args)
return super(mail_message, self)._search(cr, uid, args, offset=offset, limit=limit, order=order,
context=context, count=False, access_rights_uid=access_rights_uid)
+2 -2
View File
@@ -210,11 +210,11 @@ class test_portal(TestMail):
msg2_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body2', type='comment', subtype='mail.mt_group_public')
msg3_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body3', type='comment', subtype='mail.mt_comment')
msg4_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body4', type='comment')
msg5_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body5', type='notification')
# msg5_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body5', type='notification')
# Do: Chell search messages: should not see internal notes (comment without subtype)
msg_ids = self.mail_message.search(cr, self.user_chell_id, [('model', '=', 'mail.group'), ('res_id', '=', group_port_id)])
self.assertEqual(set(msg_ids), set([msg1_id, msg2_id, msg3_id, msg5_id]),
self.assertEqual(set(msg_ids), set([msg1_id, msg2_id, msg3_id]),
'mail_message: portal user has access to messages he should not read')
# Do: Chell read messages she can read