Files
bank-payment/account_banking/wizard/banking_transaction_wizard.xml
2012-02-17 23:36:43 +00:00

134 lines
8.6 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"/>
<field name="date"/>
<field name="amount"/>
<field name="ref"/>
<field name="partner_id"/>
</group>
<!-- (semi-) automatic matching and selection -->
<group colspan="2" col="4">
<separator string="Current match" colspan="4"/>
<field name="match_type"/>
<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)]}">
<!-- 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])]"
/>
</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>
<page string="Write-Off" attrs="{'invisible': [('match_type', '=', False)]}">
<group colspan="2" col="2">
<label string="If the amount exceeds the match, you must set a write-off account and journal for the residual of this reconciliation. If the amount is smaller than the match, this is optional. If you do not set a write-off account in this case, the result will be a partial reconciliation." colspan="2"/>
<!-- no luck with these lt/gt calculations in attrs -->
<field name="writeoff_account_id"
attrs="{'required': ['|','&amp;',('residual', '&lt;', 0),('amount', '&gt;', 0),'&amp;',('residual', '&gt;', 0),('amount', '&lt;', 0)]}"/>
<field name="writeoff_journal_id"
attrs="{'required': ['|','&amp;',('residual', '&lt;', 0),('amount', '&gt;', 0),'&amp;',('residual', '&gt;', 0),('amount', '&lt;', 0)]}"/>
<button colspan="1"
name="trigger_write"
type="object"
string="Set write-off account"/>
</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"/>
<field name="manual_move_line_id"/>
<newline/>
<button colspan="1"
name="trigger_write"
type="object"
string="Match"/>
</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>