Skip to content

Commit

Permalink
Merge PR #988 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by dhongu
  • Loading branch information
OCA-git-bot committed Jun 10, 2024
2 parents 3079a02 + 31dda20 commit a647c6f
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions l10n_ro_account_anaf_sync/models/res_company.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2022 NextERP Romania
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models
from odoo import models


class ResCompany(models.Model):
Expand All @@ -11,15 +11,7 @@ def _l10n_ro_get_anaf_sync(self, scope=None):
anaf_sync_scope = self.env["l10n.ro.account.anaf.sync.scope"]
if scope:
anaf_sync_scope |= anaf_sync_scope.search(
[
("anaf_sync_id.company_id", "=", self.id),
("scope", "=", scope),
(
"anaf_sync_id.client_token_valability",
">",
fields.Date().today(),
),
],
[("anaf_sync_id.company_id", "=", self.id), ("scope", "=", scope)],
limit=1,
)
return anaf_sync_scope

0 comments on commit a647c6f

Please sign in to comment.