account_payment_register_views.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_account_payment_register_form" model="ir.ui.view">
  4. <field name="name">account.payment.register.form</field>
  5. <field name="model">account.payment.register</field>
  6. <field name="inherit_id" ref="account.view_account_payment_register_form"/>
  7. <field name="arch" type="xml">
  8. <field name="payment_method_line_id" position="after">
  9. <field name="l10n_latam_manual_checks" invisible="1"/>
  10. <field name="payment_method_code" invisible="1"/>
  11. <field name="l10n_latam_check_number"
  12. attrs="{
  13. 'invisible': [('payment_method_code', '!=', 'new_third_party_checks'), '|', ('l10n_latam_manual_checks', '=', False), ('payment_method_code', '!=', 'check_printing')],
  14. 'required': [
  15. '|', '&amp;', ('payment_method_code', '=', 'check_printing'), ('l10n_latam_manual_checks', '!=', False), ('payment_method_code', '=', 'new_third_party_checks'),
  16. ]}"/>
  17. <div class="o_row"
  18. attrs="{'invisible': ['|', ('can_edit_wizard', '=', False), '&amp;', ('can_group_payments', '=', True), ('group_payment', '=', False)]}" colspan="2">
  19. <group>
  20. <field name="l10n_latam_check_id"
  21. attrs="{
  22. 'invisible': [('payment_method_code', 'not in', ['in_third_party_checks', 'out_third_party_checks'])],
  23. 'required': [('payment_method_code', 'in', ['in_third_party_checks', 'out_third_party_checks'])]}"
  24. domain="
  25. [('payment_method_code', '=', 'new_third_party_checks'), ('l10n_latam_check_current_journal_id', '=', journal_id), ('state', '=', 'posted')]
  26. if payment_type == 'outbound' else
  27. [('payment_method_code', '=', 'new_third_party_checks'), ('l10n_latam_check_current_journal_id', '=', False), ('state', '=', 'posted')]"
  28. options="{'no_create': True}"/>
  29. <field name="l10n_latam_check_payment_date"
  30. attrs="{'invisible': [('payment_method_code', '!=', 'new_third_party_checks'), '|', ('l10n_latam_manual_checks', '=', False), ('payment_method_code', '!=', 'check_printing')]}"/>
  31. <field name="l10n_latam_check_bank_id" string="Check Bank"
  32. attrs="{'invisible': [('payment_method_code', '!=', 'new_third_party_checks')]}"/>
  33. <field name="l10n_latam_check_issuer_vat" string="Check Issuer Vat"
  34. attrs="{'invisible': [('payment_method_code', '!=', 'new_third_party_checks')]}"/>
  35. </group>
  36. </div>
  37. <div colspan="2" class="o_row"
  38. attrs="{'invisible': ['|', ('payment_method_code', 'not in', ['new_third_party_checks', 'in_third_party_checks', 'out_third_party_checks']), '&amp;', ('can_edit_wizard', '=', True), '|', ('can_group_payments', '=', False), '&amp;', ('can_group_payments', '=', True), ('group_payment', '=', True)]}">
  39. <p class="alert alert-warning" role="alert">You can't use checks when paying invoices of different partners or same partner without grouping</p>
  40. </div>
  41. </field>
  42. </field>
  43. </record>
  44. </odoo>