diff options
| author | Olivier Dony <odo@openerp.com> | 2014-08-07 12:50:13 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2014-08-07 18:03:08 +0200 |
| commit | 2bbff57691a33a02ca6a85a600f0b32035daa2a4 (patch) | |
| tree | 4f63d073b9cf79613405a529d229d6ed6ec88bad /addons/mail | |
| parent | 935c4766641b5076baa08158b0cf8d6fc6e432e1 (diff) | |
[IMP] hr,mail,product,project,base: use @auto_join=True on _inherits FK field
This can give a performance boost on large databases
and should not be a concern in terms of access control
as the inheritance already grants access to the parent
records.
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/mail_mail.py | 2 | ||||
| -rw-r--r-- | addons/mail/res_users.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index aeea2c0b1a5..fa4122cbedd 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -44,7 +44,7 @@ class mail_mail(osv.Model): _rec_name = 'subject' _columns = { - 'mail_message_id': fields.many2one('mail.message', 'Message', required=True, ondelete='cascade'), + 'mail_message_id': fields.many2one('mail.message', 'Message', required=True, ondelete='cascade', auto_join=True), 'state': fields.selection([ ('outgoing', 'Outgoing'), ('sent', 'Sent'), diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py index 097893ae601..eedc04603f0 100644 --- a/addons/mail/res_users.py +++ b/addons/mail/res_users.py @@ -40,7 +40,7 @@ class res_users(osv.Model): _columns = { 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True, help="Email address internally associated with this user. Incoming "\ - "emails will appear in the user's notifications.", copy=False), + "emails will appear in the user's notifications.", copy=False, auto_join=True), 'display_groups_suggestions': fields.boolean("Display Groups Suggestions"), } |
