diff --git a/account_payment_order/models/account_move_line.py b/account_payment_order/models/account_move_line.py index 6606dd63a..806745d9f 100644 --- a/account_payment_order/models/account_move_line.py +++ b/account_payment_order/models/account_move_line.py @@ -57,7 +57,7 @@ class AccountMoveLine(models.Model): communication = self.ref or self.name # change these default values if move line is linked to an invoice if self.move_id.is_invoice(): - if self.move_id.reference_type != "none": + if (self.move_id.reference_type or "none") != "none": communication = self.move_id.ref ref2comm_type = aplo.invoice_reference_type2communication_type() communication_type = ref2comm_type[self.move_id.reference_type] diff --git a/account_payment_order/views/account_invoice_view.xml b/account_payment_order/views/account_invoice_view.xml index 843663693..3ca3703b8 100644 --- a/account_payment_order/views/account_invoice_view.xml +++ b/account_payment_order/views/account_invoice_view.xml @@ -45,9 +45,9 @@