diff --git a/account_payment_order/models/account_move_line.py b/account_payment_order/models/account_move_line.py index 9e79d5e29..6824a9076 100644 --- a/account_payment_order/models/account_move_line.py +++ b/account_payment_order/models/account_move_line.py @@ -54,7 +54,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 5b162ebb9..f705b70e2 100644 --- a/account_payment_order/views/account_invoice_view.xml +++ b/account_payment_order/views/account_invoice_view.xml @@ -45,10 +45,10 @@