[FIX] ir_mail_server: _get_default_bounce_address

fails due to ir.config_parameter permission

At rev. 80017b04c2
ir.config_parameter model has been restricted to employees

Getting parameter from this model should therefore
be done as SUPERUSER_ID where the uid could
be a user which is not an employee.

Closes #5280
This commit is contained in:
Christophe Combelles 2015-02-15 00:59:14 +02:00 committed by Denis Ledoux
parent eaad70daac
commit 3d11e6fae3
1 changed files with 2 additions and 2 deletions

View File

@ -375,10 +375,10 @@ class ir_mail_server(osv.osv):
'''
get_param = self.pool['ir.config_parameter'].get_param
postmaster = get_param(cr, uid, 'mail.catchall.alias',
postmaster = get_param(cr, SUPERUSER_ID, 'mail.catchall.alias',
default='postmaster-odoo',
context=context,)
domain = get_param(cr, uid, 'mail.catchall.domain', context=context)
domain = get_param(cr, SUPERUSER_ID, 'mail.catchall.domain', context=context)
if postmaster and domain:
return '%s@%s' % (postmaster, domain)