mirror of
https://github.com/bringout/oca-ocb-accounting.git
synced 2026-04-25 00:22:01 +02:00
19.0 vanilla
This commit is contained in:
parent
ba20ce7443
commit
768b70e05e
2357 changed files with 1057103 additions and 712486 deletions
|
|
@ -6,6 +6,7 @@ from odoo.tools import date_utils
|
|||
class ResCompany(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
@api.readonly
|
||||
@api.model
|
||||
def get_fiscal_dates(self, payload):
|
||||
companies = self.env["res.company"].browse(
|
||||
|
|
@ -13,7 +14,7 @@ class ResCompany(models.Model):
|
|||
)
|
||||
existing_companies = companies.exists()
|
||||
# prefetch both fields
|
||||
existing_companies.read(["fiscalyear_last_day", "fiscalyear_last_month"])
|
||||
existing_companies.fetch(["fiscalyear_last_day", "fiscalyear_last_month"])
|
||||
results = []
|
||||
|
||||
for data, company in zip(payload, companies):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue