mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
This is a workaround for web client issue lp:1073521, "cannot select many2one value if tree view is editable"
150 lines
9.5 KiB
XML
150 lines
9.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
<record model="ir.ui.view" id="transaction_wizard_first">
|
|
<field name="name">transaction.wizard.first</field>
|
|
<field name="type">form</field>
|
|
<field name="model">banking.transaction.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Match transaction">
|
|
<!-- fields used for form logic -->
|
|
<field name="payment_order_ids" invisible="True"/>
|
|
<field name="invoice_ids" invisible="True"/>
|
|
<field name="move_line_ids" invisible="True"/>
|
|
<field name="match_multi" invisible="True"/>
|
|
<field name="duplicate" invisible="True"/>
|
|
<group colspan="2" col="2">
|
|
<group colspan="2" col="4">
|
|
<separator string="Transaction data" colspan="4"/>
|
|
<field name="partner_id"/>
|
|
<field name="date"/>
|
|
<field name="ref"/>
|
|
<field name="amount"/>
|
|
</group>
|
|
|
|
<!-- (semi-) automatic matching and selection -->
|
|
|
|
<group colspan="2" col="4">
|
|
|
|
<separator string="Current match" colspan="4"/>
|
|
<field name="match_type"/>
|
|
<newline />
|
|
<field name="move_currency_amount" />
|
|
<newline />
|
|
<field name="residual"/>
|
|
<group attrs="{'invisible': [('match_multi', '=', False)]}" colspan="4" col="2">
|
|
<separator string="Multiple matches" colspan="2"/>
|
|
<label colspan="2" string="Multiple matches were found for this bank transfer. You must pick one of the matches or select a match manually below." />
|
|
</group>
|
|
<field name='payment_line_id'
|
|
attrs="{'invisible': [('match_type', '!=', 'storno'),('match_type', '!=', 'payment')]}"
|
|
/>
|
|
<group attrs="{'readonly': [('match_multi', '!=', True)]}" col="8">
|
|
<!-- show if we have an invoice type match (but the user may need to select from multiple options)
|
|
or whenever there is an invoice_id (e.g. in case of a manual match)
|
|
-->
|
|
<field name='invoice_id'
|
|
attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'invoice'),('invoice_id', '=', False)]}"
|
|
domain="[('id', 'in', invoice_ids[0][2])]"
|
|
/>
|
|
<!-- show if we have a move type match or a manual match without an invoice_id
|
|
-->
|
|
<field name='move_line_id'
|
|
attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'move'),('invoice_id', '=', False)]}"
|
|
domain="[('id', 'in', move_line_ids[0][2])]"
|
|
/>
|
|
<field name='payment_order_id'
|
|
attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'payment_order')]}"
|
|
domain="[('id', 'in', payment_order_ids[0][2])]"
|
|
/>
|
|
<field name='analytic_account_id' />
|
|
</group>
|
|
<button colspan="1"
|
|
name="trigger_write"
|
|
type="object"
|
|
attrs="{'invisible': [('match_multi', '=', False)]}"
|
|
string="Select"/>
|
|
<newline/>
|
|
|
|
<!-- residual and write off -->
|
|
|
|
</group>
|
|
<notebook>
|
|
<!-- Duplicate flagging -->
|
|
<page string="Duplicate" attrs="{'invisible': [('duplicate', '=', False)]}">
|
|
<group colspan="2" col="2">
|
|
<label colspan="2" string="This bank transfer was marked as a duplicate. You can either confirm that this is not the case, or remove the bank transfer from the system."/>
|
|
<newline/>
|
|
<button colspan="1"
|
|
name="reverse_duplicate"
|
|
type="object"
|
|
string="Remove duplicate flag"/>
|
|
</group>
|
|
</page>
|
|
<!-- Redo automatic match -->
|
|
<page string="Match again">
|
|
<label string="You can let the system try to match this bank statement line again after you have made any changes in the database (for instance, add an invoice or a bank account)." colspan="2"/>
|
|
<newline/>
|
|
<button colspan="1"
|
|
name="trigger_match"
|
|
type="object"
|
|
string="Match again"/>
|
|
<!-- Manual selection -->
|
|
</page>
|
|
<page string="Manual match">
|
|
<field name="manual_invoice_id"/>
|
|
<!--
|
|
Specify alternative tree_view_ref as a
|
|
workaround for lp:1073521 in OpenERP 6.1
|
|
Need to also define 'view_mode' to prevent
|
|
an instant editable tree view
|
|
reconstruction by account.move.line's
|
|
fields_view_get().
|
|
Both are not needed in OpenERP 6.0 or 7.0.
|
|
-->
|
|
<field name="manual_move_line_id"
|
|
context="{
|
|
'tree_view_ref': 'account.view_move_line_tax_tree',
|
|
'view_mode': 'yes'
|
|
}"
|
|
/>
|
|
<newline/>
|
|
<button colspan="1"
|
|
name="trigger_write"
|
|
type="object"
|
|
string="Match"/>
|
|
</page>
|
|
<page string="Write-Off" attrs="{'invisible': [('match_type', '=', False)]}">
|
|
<group colspan="2" col="2">
|
|
<label string="Choose what you want to do with the eventual difference between the paid amount and the sum of allocated amounts. You can either choose to keep open this difference on the partner's account, or reconcile it with the payment." colspan="2"/>
|
|
<field name="payment_option" />
|
|
<field name="writeoff_account_id" attrs="{'required':[('payment_option','=','with_writeoff')],'invisible':[('payment_option','=','without_writeoff')]}" />
|
|
<field name="writeoff_analytic_id" attrs="{'required':[('payment_option','=','with_writeoff')],'invisible':[('payment_option','=','without_writeoff')]}" />
|
|
<button colspan="1"
|
|
name="trigger_write"
|
|
type="object"
|
|
string="Set write-off account"/>
|
|
</group>
|
|
</page>
|
|
<page string="Disable reconciliation" attrs="{'invisible': [('match_type', '==', False)]}">
|
|
<group colspan="2" col="2">
|
|
<label string="You can disable the reconciliation of this bank transfer" colspan="2"/>
|
|
<newline/>
|
|
<button colspan="1"
|
|
name="disable_match"
|
|
type="object"
|
|
string="Disable reconciliation"/>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
<group colspan="2">
|
|
<separator/>
|
|
<button icon="gtk-ok" string="Done" special="cancel"/>
|
|
</group>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</openerp>
|