Skip to content

Commit

Permalink
IMP acc_fisc_classif: domain definition
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain authored and bealdav committed Jun 13, 2024
1 parent a8db5d0 commit f8d0755
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ def _find_or_create_classification(self, vals):
for elm in ("supplier_taxes_id", "taxes_id"):
if elm in vals:
del vals[elm]
domain = [("sale_tax_ids", "=", [])]
if sale_tax_ids:
domain = [("sale_tax_ids", "in", sale_tax_ids)]
domain.append(("purchase_tax_ids", "in", purchase_tax_ids or []))
domain = [
("sale_tax_ids", "in", sale_tax_ids),
("purchase_tax_ids", "in", purchase_tax_ids),
]
classification = self.env["account.product.fiscal.classification"].search(
domain, limit=1
)
Expand Down

0 comments on commit f8d0755

Please sign in to comment.