[FIX] res_users in mail: fixed override of chatter get_domain; fixed view; res_partner: fixed an indentation issue.

bzr revid: tde@openerp.com-20120704094547-cll23akw4euq0yih
This commit is contained in:
Thibault Delavallée 2012-07-04 11:45:47 +02:00
parent 2f3256d325
commit b68d283a17
3 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@
<field name="arch" type="xml">
<xpath expr="//sheet" position="after">
<footer>
<field name="message_ids" widget="mail_thread"
<field name="message_ids" widget="mail_thread"
options='{"thread_level": 1}'/>
</footer>
</xpath>

View File

@ -73,10 +73,10 @@ class res_users(osv.osv):
The purpose is to add messages directly sent to user using
@user_login.
"""
initial_domain = super(res_partner, self).message_search_get_domain(cr, uid, ids, context=context)
initial_domain = super(res_users, self).message_search_get_domain(cr, uid, ids, context=context)
custom_domain = []
for user in self.browse(cr, uid, ids, context=context):
if custom_domain:
custom_domain += ['|']
custom_domain += ['|', ('body_text', 'like', '@%s' % (user.login)), ('body_html', 'like', '@%s' % (user.login))]
return ['|'] + search_domain + custom_domain
return ['|'] + initial_domain + custom_domain

View File

@ -27,9 +27,9 @@
<field name="notification_email_pref"/>
</field>
<xpath expr="/form/sheet" position="after">
<div class="oe_bottom">
<footer>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</footer>
</xpath>
</data>
</field>