Merge pull request #5814 from expsa/fix_test_note
[FIX] notes on partner bank payment
This commit is contained in:
commit
c3049319c3
|
|
@ -852,6 +852,7 @@ class DonationsDetailsLines(models.Model):
|
|||
record_type = rec.sponsorship_id.record_type if rec.sponsorship_id else rec.sponsorship_mechanism_id.record_type
|
||||
|
||||
if record_type == 'donation':
|
||||
domain.append('|')
|
||||
domain.append(('donation_category', '=', 'donation'))
|
||||
domain.append(('donation_category', '=', 'endowment'))
|
||||
|
||||
|
|
|
|||
|
|
@ -324,6 +324,11 @@
|
|||
context="{'group_by': 'target_donation'}"/>
|
||||
<field name="name" widget="section_and_note_text" optional="show"/>
|
||||
<field name="direct_debit"/>
|
||||
<field name="sponsor_id" invisible="1"/>
|
||||
<field name="direct_debit_partner_bank_id"
|
||||
context="{'form_view_ref': 'odex_takaful.res_partner_bank_view_form_quick_create', 'default_partner_id': sponsor_id}"
|
||||
attrs="{'invisible': [('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}"
|
||||
options="{'skip_disable_quick_create': True}"/>
|
||||
<field name="journal_id"
|
||||
attrs="{'invisible': [('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}"/>
|
||||
|
||||
|
|
@ -563,7 +568,8 @@
|
|||
<field name="sponsor_id" invisible="1"/>
|
||||
<field name="direct_debit_partner_bank_id"
|
||||
context="{'form_view_ref': 'odex_takaful.res_partner_bank_view_form_quick_create', 'default_partner_id': sponsor_id}"
|
||||
attrs="{'invisible': ['|', ('payment_month_count_visibility','!=', True),('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}"/>
|
||||
attrs="{'invisible': ['|', ('payment_month_count_visibility','!=', True),('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}"
|
||||
options="{'skip_disable_quick_create': True}"/>
|
||||
<field name="journal_id"
|
||||
attrs="{'invisible': ['|', ('payment_month_count_visibility','!=', True),('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<xpath expr="//field[@name='partner_bank_id']" position="attributes">
|
||||
<attribute name="invisible">context.get('sponsorship_payment')</attribute>
|
||||
<!-- <attribute name="options">{'skip_disable_quick_create': True}</attribute>-->
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='payment_method_line_id']" position="attributes">
|
||||
|
|
@ -49,23 +50,23 @@
|
|||
<field name="payment_method" invisible="1"/>
|
||||
<field name="check_number" attrs="{'invisible': ['|', ('sponsorship_payment', '=', False), ('takaful_payment_method','!=','check')], 'required': [('sponsorship_payment', '=', True), ('takaful_payment_method','=','check')]}"/>
|
||||
<field name="check_due_date" attrs="{'invisible': ['|', ('sponsorship_payment', '=', False), ('takaful_payment_method','!=','check')], 'required': [('sponsorship_payment', '=', True), ('takaful_payment_method','=','check')]}"/>
|
||||
<field name="partner_bank_id" context="{'form_view_ref': 'odex_takaful.res_partner_bank_view_form_quick_create', 'default_partner_id': context.get('force_sponsorship_line_partner_id')}" attrs="{'required': [('sponsorship_payment', '=', True), ('takaful_payment_method','=','bank')], 'invisible': ['|', ('sponsorship_payment', '=', False), ('takaful_payment_method','!=','bank')]}" create="1" edit="1"/>
|
||||
<field name="partner_bank_id" options="{'skip_disable_quick_create': True}" context="{'form_view_ref': 'odex_takaful.res_partner_bank_view_form_quick_create', 'default_partner_id': context.get('force_sponsorship_line_partner_id')}" attrs="{'required': [('sponsorship_payment', '=', True), ('takaful_payment_method','=','bank')], 'invisible': ['|', ('sponsorship_payment', '=', False), ('takaful_payment_method','!=','bank')]}" create="1" edit="1"/>
|
||||
<field name="transaction_file_attachment" widget="binary"
|
||||
filename="transaction_attachment_file_name"
|
||||
attrs="{'invisible': ['|', ('sponsorship_payment', '=', False), ('takaful_payment_method','not in',['bank', 'check'])], 'required': [('sponsorship_payment', '=', True), ('takaful_payment_method','=','bank')]}"/>
|
||||
<field name="transaction_attachment_file_name" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//footer/button[2]" position="after">
|
||||
<field name="show_cancel_button" invisible="1"/>
|
||||
<xpath expr="//footer/button[2]" position="replace">
|
||||
<!-- <field name="show_cancel_button" invisible="1"/>-->
|
||||
<button name="action_cancel"
|
||||
type="object"
|
||||
string="Cancel"
|
||||
class="btn-secondary"
|
||||
attrs="{'invisible': [('show_cancel_button', '=', True)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//footer/button[2]" position="attributes">
|
||||
<attribute name="attrs">{'invisible':[('show_cancel_button','=',False)]}</attribute>
|
||||
class="btn-secondary"/>
|
||||
<!-- attrs="{'invisible': [('show_cancel_button', '=', True)]}" />-->
|
||||
</xpath>
|
||||
<!-- <xpath expr="//footer/button[2]" position="attributes">-->
|
||||
<!-- <attribute name="attrs">{'invisible':[('show_cancel_button','=',False)]}</attribute>-->
|
||||
<!-- </xpath>-->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@
|
|||
<field name="direct_debit" force_save="1"/>
|
||||
<field name="direct_debit_partner_bank_id"
|
||||
context="{'form_view_ref': 'odex_takaful.res_partner_bank_view_form_quick_create', 'default_partner_id': partner_id}"
|
||||
attrs="{'invisible': [('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}" create="1" edit="1"/>
|
||||
attrs="{'invisible': [('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}"
|
||||
options="{'skip_disable_quick_create': True}"/>
|
||||
<field name="journal_id" attrs="{'invisible': [('direct_debit', '=', False)], 'required': [('direct_debit', '=', True)]}"/>
|
||||
<field name="debit_payment_file_attachment" widget="binary"
|
||||
filename="debit_payment_attachment_file_name"
|
||||
|
|
|
|||
Loading…
Reference in New Issue