mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_mass_reconcile_as_job: do not duplicate jobs
This commit is contained in:
committed by
Akim Juillerat
parent
eae79ad34b
commit
ddf636ec06
@@ -5,6 +5,7 @@ import ast
|
||||
import logging
|
||||
|
||||
from odoo import models
|
||||
from odoo.addons.queue_job.job import identity_exact
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -25,7 +26,8 @@ class AccountMassReconcile(models.Model):
|
||||
|
||||
if as_job and self.env.context.get("mass_reconcile_as_job", True):
|
||||
for rec in self:
|
||||
rec.with_delay().reconcile_as_job()
|
||||
job_options = {"identity_key": identity_exact}
|
||||
rec.with_delay(**job_options).reconcile_as_job()
|
||||
return True
|
||||
else:
|
||||
return super().run_reconcile()
|
||||
|
||||
Reference in New Issue
Block a user