diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml index 1f93e62126ea2d3b9fcbfaf0ac3ce4291d178665..dfa029a8c67d6ff2a20ddb9edc1e429e0d8fa7ef 100644 --- a/addons/account/views/account_payment_view.xml +++ b/addons/account/views/account_payment_view.xml @@ -99,8 +99,8 @@ <field name="payment_type" widget="radio" attrs="{'readonly': [('state', '!=', 'draft')]}"/> <field name="partner_type" nolabel="1" widget="selection" string="" attrs="{'required': [('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))], 'readonly': [('state', '!=', 'draft')]}"/> <div> - <field name="partner_id" nolabel="1" attrs="{'required': [('payment_type', '=', 'outbound')], 'invisible': [('payment_type', '!=', 'outbound')], 'readonly': [('state', '!=', 'draft')]}" context="{'default_is_company': True, 'default_customer': True}" domain = "[('customer', '=', True)]"/> - <field name="partner_id" nolabel="1" attrs="{'required': [('payment_type', '=', 'inbound')], 'invisible': [('payment_type', '!=', 'inbound')], 'readonly': [('state', '!=', 'draft')]}" context="{'default_is_company': True, 'default_supplier': True}" domain = "[('supplier', '=', True)]"/> + <field name="partner_id" nolabel="1" attrs="{'required': [('partner_type', '=', 'customer')], 'invisible': [('partner_type', '!=', 'customer')], 'readonly': [('state', '!=', 'draft')]}" context="{'default_is_company': True, 'default_customer': True}" domain = "[('customer', '=', True)]"/> + <field name="partner_id" nolabel="1" attrs="{'required': [('partner_type', '=', 'supplier')], 'invisible': [('partner_type', '!=', 'supplier')], 'readonly': [('state', '!=', 'draft')]}" context="{'default_is_company': True, 'default_supplier': True}" domain = "[('supplier', '=', True)]"/> </div> <field name="journal_id" widget="selection" attrs="{'readonly': [('state', '!=', 'draft')]}"/> <field name="destination_journal_id" widget="selection" attrs="{'required': [('payment_type', '=', 'transfer')], 'invisible': [('payment_type', '!=', 'transfer')], 'readonly': [('state', '!=', 'draft')]}"/>