mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 08:47:40 +00:00
[FIX] call method on attachement_id instead of self
This commit is contained in:
@@ -26,13 +26,13 @@ class ShippingLabel(models.Model):
|
|||||||
# we keep them in the database instead of the object storage
|
# we keep them in the database instead of the object storage
|
||||||
location = self.attachment_id._storage()
|
location = self.attachment_id._storage()
|
||||||
for attach in self:
|
for attach in self:
|
||||||
if location == 's3' and self._store_in_db_when_s3():
|
if location == 's3' and self.attachment_id._store_in_db_when_s3():
|
||||||
# compute the fields that depend on datas
|
# compute the fields that depend on datas
|
||||||
value = attach.datas
|
value = attach.datas
|
||||||
bin_data = value and value.decode('base64') or ''
|
bin_data = value and value.decode('base64') or ''
|
||||||
vals = {
|
vals = {
|
||||||
'file_size': len(bin_data),
|
'file_size': len(bin_data),
|
||||||
'checksum': self._compute_checksum(bin_data),
|
'checksum': self.attachment_id._compute_checksum(bin_data),
|
||||||
'db_datas': value,
|
'db_datas': value,
|
||||||
# we seriously don't need index content on those fields
|
# we seriously don't need index content on those fields
|
||||||
'index_content': False,
|
'index_content': False,
|
||||||
|
|||||||
Reference in New Issue
Block a user