diff --git a/addons/l10n_it_stock_ddt/models/account_invoice.py b/addons/l10n_it_stock_ddt/models/account_invoice.py index a92ce368e30..b7a9eb609b4 100644 --- a/addons/l10n_it_stock_ddt/models/account_invoice.py +++ b/addons/l10n_it_stock_ddt/models/account_invoice.py @@ -24,7 +24,7 @@ class AccountMove(models.Model): def _l10n_it_edi_invoice_is_direct(self): """ An invoice is only direct if the Transport Documents are all done the same day as the invoice. """ for ddt in self.l10n_it_ddt_ids: - if not ddt.date_done or ddt.date_done != self.invoice_date: + if not ddt.date_done or ddt.date_done.date() != self.invoice_date: return False return True