|
@ -103,7 +103,7 @@ class IrAttachment(models.Model): |
|
|
@api.multi |
|
|
@api.multi |
|
|
def migrate(self, batch_size=None): |
|
|
def migrate(self, batch_size=None): |
|
|
commit_on_batch = bool(batch_size) |
|
|
commit_on_batch = bool(batch_size) |
|
|
batch_size = batch_size or len(self) |
|
|
|
|
|
|
|
|
batch_size = batch_size or len(self) or 1 |
|
|
storage_location = self._storage().upper() |
|
|
storage_location = self._storage().upper() |
|
|
batches = math.ceil(len(self) / batch_size) |
|
|
batches = math.ceil(len(self) / batch_size) |
|
|
for index, attachment in enumerate(self, start=1): |
|
|
for index, attachment in enumerate(self, start=1): |
|
|