[FIX] base: no cache for ir.attachment._filestore, restore context
Due to a compatibility problem between the new API
implementation and the @ormcache decorator, the
context parameter of ir.attachment._filestore()
was dropped at rev. 0beb14f0d2
However the need for caching this method has
disappeared in Odoo 8 (it used to require a
DB query). So it is even better to drop the
@ormcache decorator altogether, and keep the
context parameter.
This avoids a useless change of method signature,
even if that was on a private method.
This commit is contained in:
parent
6dad39297e
commit
f87570e83f
|
@ -71,8 +71,7 @@ class ir_attachment(osv.osv):
|
|||
def _storage(self, cr, uid, context=None):
|
||||
return self.pool['ir.config_parameter'].get_param(cr, SUPERUSER_ID, 'ir_attachment.location', 'file')
|
||||
|
||||
@tools.ormcache(skiparg=3)
|
||||
def _filestore(self, cr, uid):
|
||||
def _filestore(self, cr, uid, context=None):
|
||||
return tools.config.filestore(cr.dbname)
|
||||
|
||||
def force_storage(self, cr, uid, context=None):
|
||||
|
|
Loading…
Reference in New Issue