mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
[IMP]: Allow to use context Key as storage key
This commit is contained in:
@@ -156,6 +156,8 @@ class IrAttachment(models.Model):
|
||||
location = self.env.context.get('storage_location') or self._storage()
|
||||
if location in self._get_stores():
|
||||
bin_data = base64.b64decode(value)
|
||||
key = self.env.context.get('force_storage_key')
|
||||
if not key:
|
||||
key = self._compute_checksum(bin_data)
|
||||
filename = self._store_file_write(key, bin_data)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user