[IMP] account_reconcile_oca: Allow an option to avoid a function
parent
87d4cdae86
commit
c246fcc586
|
@ -1266,3 +1266,11 @@ class AccountBankStatementLine(models.Model):
|
||||||
for line in lines:
|
for line in lines:
|
||||||
self._add_account_move_line(line, keep_current=True)
|
self._add_account_move_line(line, keep_current=True)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def _retrieve_partner(self):
|
||||||
|
if self.env.context.get("skip_retrieve_partner"):
|
||||||
|
# This hook can be used, for example, when importing files.
|
||||||
|
# With large databases, we already have the information, moreover,
|
||||||
|
# the data might be preloaded, so it has no sense to import it again
|
||||||
|
return self.partner_id
|
||||||
|
return super()._retrieve_partner()
|
||||||
|
|
Loading…
Reference in New Issue