diff --git a/addons/l10n_latam_invoice_document/models/account_move.py b/addons/l10n_latam_invoice_document/models/account_move.py index c68c2d01ba2..78612a090fe 100644 --- a/addons/l10n_latam_invoice_document/models/account_move.py +++ b/addons/l10n_latam_invoice_document/models/account_move.py @@ -272,7 +272,8 @@ class AccountMove(models.Model): """ The constraint _check_unique_sequence_number is valid for customer bills but not valid for us on vendor bills because the uniqueness must be per partner """ for rec in self.filtered( - lambda x: x.name and x.name != '/' and x.is_purchase_document() and x.l10n_latam_use_documents): + lambda x: x.name and x.name != '/' and x.is_purchase_document() and x.l10n_latam_use_documents + and x.commercial_partner_id): domain = [ ('move_type', '=', rec.move_type), # by validating name we validate l10n_latam_document_type_id