[FIX] base: keep mimetypes after force_storage
The write override recomputed the mimetype when changing the datas It may give a different result closes odoo/odoo#24397 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
committed by
Martin Trigaux
parent
e479d8d73d
commit
5f9c8ced24
@@ -65,7 +65,8 @@ class IrAttachment(models.Model):
|
||||
}[self._storage()]
|
||||
|
||||
for attach in self.search(domain):
|
||||
attach.write({'datas': attach.datas})
|
||||
# pass mimetype, to avoid recomputation
|
||||
attach.write({'datas': attach.datas, 'mimetype': attach.mimetype})
|
||||
return True
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user