Add cache to account period find and return instance

Closes #7705
This commit is contained in:
Cédric Krier
2023-02-10 23:36:18 +01:00
parent 54630b81dc
commit 45bbfa8fb5
16 changed files with 94 additions and 80 deletions
+2 -2
View File
@@ -576,9 +576,9 @@ class Statement(Workflow, ModelSQL, ModelView):
Move = pool.get('account.move')
Period = pool.get('account.period')
period_id = Period.find(self.company.id, date=key['date'])
period = Period.find(self.company, date=key['date'])
return Move(
period=period_id,
period=period,
journal=self.journal.journal,
date=key['date'],
origin=self,