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:
@@ -17,7 +17,7 @@ class ShippingLabel(models.Model):
|
|||||||
|
|
||||||
@api.depends('store_fname', 'db_datas')
|
@api.depends('store_fname', 'db_datas')
|
||||||
def _compute_datas(self):
|
def _compute_datas(self):
|
||||||
values = self._data_get('datas', None)
|
values = self.attachment_id._data_get('datas', None)
|
||||||
for attach in self:
|
for attach in self:
|
||||||
attach.datas = values.get(attach.id)
|
attach.datas = values.get(attach.id)
|
||||||
|
|
||||||
@@ -43,6 +43,6 @@ class ShippingLabel(models.Model):
|
|||||||
# have write access
|
# have write access
|
||||||
super(ShippingLabel, attach.sudo()).write(vals)
|
super(ShippingLabel, attach.sudo()).write(vals)
|
||||||
if fname:
|
if fname:
|
||||||
self._file_delete(fname)
|
self.attachment_id._file_delete(fname)
|
||||||
continue
|
continue
|
||||||
self.attachment_id._data_set('datas', attach.datas, None)
|
self.attachment_id._data_set('datas', attach.datas, None)
|
||||||
|
|||||||
Reference in New Issue
Block a user