Skip to content

Commit

Permalink
Update account_journal_views.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
jjscarafia committed Dec 20, 2022
1 parent 1168bb9 commit ab625b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions account_withholding/views/account_journal_views.xml
Expand Up @@ -6,9 +6,10 @@
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<!-- make default_account_id optional if withholdings journal -->
<xpath expr="//field[@name='default_account_id']" position="attributes">
<attribute name="attrs">{'required': [('id', '!=', False), ('type', '=', 'cash'), '!', ('selected_payment_method_codes', 'like', 'withholding')], 'invisible': [('type', '!=', 'cash'),]}</attribute>
</xpath>
<field name="default_account_id" position="attributes">
<attribute name="attrs">{'required': ['|', '&amp;', '&amp;', ('id', '!=', False), ('type', 'in', ('bank', 'cash')), '!', ('selected_payment_method_codes', 'like', 'withholding'), ('type', 'in', ('sale', 'purchase'))],
'invisible': [('type', '=', False)]}</attribute>
</field>
</field>
</record>
</odoo>

0 comments on commit ab625b3

Please sign in to comment.