From f8d0755e139edd173ef0111f6fb4d7e640a7e95d Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Thu, 13 Jun 2024 22:31:17 +0200 Subject: [PATCH] IMP acc_fisc_classif: domain definition --- .../models/product_template.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/account_product_fiscal_classification/models/product_template.py b/account_product_fiscal_classification/models/product_template.py index b0fd3a91d..7187d6c4a 100644 --- a/account_product_fiscal_classification/models/product_template.py +++ b/account_product_fiscal_classification/models/product_template.py @@ -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 )