diff --git a/document_ocr/data/ir_cron.xml b/document_ocr/data/ir_cron.xml
index f69d151a..1ea8cd20 100644
--- a/document_ocr/data/ir_cron.xml
+++ b/document_ocr/data/ir_cron.xml
@@ -8,6 +8,7 @@
ir.attachment
_ocr_cron
-1
+ (100,)
diff --git a/document_ocr/models/ir_attachment.py b/document_ocr/models/ir_attachment.py
index ec161712..7a69a718 100644
--- a/document_ocr/models/ir_attachment.py
+++ b/document_ocr/models/ir_attachment.py
@@ -70,10 +70,10 @@ class IrAttachment(models.Model):
return StringIO(stdout)
@api.model
- def _ocr_cron(self):
+ def _ocr_cron(self, limit=0):
for this in self.with_context(document_ocr_force=True).search([
('index_content', '=', _MARKER_PHRASE),
- ]):
+ ], limit=limit):
if not this.datas:
continue
file_type, index_content = this._index(