[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:
parent
eaad70daac
commit
3d11e6fae3
|
@ -375,10 +375,10 @@ class ir_mail_server(osv.osv):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
get_param = self.pool['ir.config_parameter'].get_param
|
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',
|
default='postmaster-odoo',
|
||||||
context=context,)
|
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:
|
if postmaster and domain:
|
||||||
return '%s@%s' % (postmaster, domain)
|
return '%s@%s' % (postmaster, domain)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue