Files
bank-payment/account_direct_debit/views/account_payment.xml

52 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- distinguish between payment orders and debit orders in the menu -->
<record id="account_payment.action_payment_order_tree" model="ir.actions.act_window">
<field name="domain">[('payment_order_type', '=', 'payment')]</field>
<field name="context">{'search_payment_order_type': 'payment'}</field>
</record>
<record id="action_debit_order_tree" model="ir.actions.act_window">
<field name="name">Direct Debit Orders</field>
<field name="res_model">payment.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_payment_order_type': 'debit',
'default_payment_order_type': 'debit'}</field>
<field name="search_view_id" ref="account_payment.view_payment_order_search"/>
<field name="domain">[('payment_order_type', '=', 'debit')]</field>
<field name="help">A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for.</field>
</record>
<menuitem action="action_debit_order_tree" id="menu_action_debit_order_form" parent="account_payment.menu_main_payment" sequence="4"/>
<record id="view_payment_order_form" model="ir.ui.view">
<field name="name">direct.debit.payment.order.form</field>
<field name="model">payment.order</field>
<field name="inherit_id" ref="account_banking_payment_export.view_payment_order_form"/>
<field name="priority" eval="60"/>
<field name="arch" type="xml">
<button string="Invoices" position="attributes">
<attribute name="attrs">{'invisible': ['|', ('state', '!=', 'draft'), ('payment_order_type', '!=', 'payment')]}</attribute>
</button>
<div class=" oe_right oe_button_box" position="inside">
<button name="%(account_payment.action_create_payment_order)s"
class="oe_inline oe_stat_button oe_right"
string="Invoices"
help="Select invoices to collect"
type="action"
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('payment_order_type', '!=', 'debit')]}"
icon="fa-pencil-square-o"
widget="statinfo"/>
</div>
<field name="mode" position="attributes">
<attribute name="domain">[('payment_order_type', '=', payment_order_type)]</attribute>
</field>
</field>
</record>
</data>
</openerp>