diff --git a/account_payment_order/views/account_payment_line.xml b/account_payment_order/views/account_payment_line.xml
index 54b89ba5e..a95be5f58 100644
--- a/account_payment_order/views/account_payment_line.xml
+++ b/account_payment_order/views/account_payment_line.xml
@@ -19,7 +19,8 @@
+ attrs="{'required': [('bank_account_required', '=', True)]}"
+ context="{'default_partner_id': partner_id}"/>