mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Add button "Add to payment/debit order" on invoice form view Started to integrate payment transfer in account_payment_order (not finished at all though) Various fixes/changes/improvements/...
56 lines
2.3 KiB
XML
56 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
|
Copyright (C) 2016 Akretion (http://www.akretion.com/)
|
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
The licence is in the file __openerp__.py
|
|
-->
|
|
|
|
<openerp>
|
|
<data>
|
|
|
|
<record id="invoice_form" model="ir.ui.view">
|
|
<field name="name">account_payment_order.invoice_form</field>
|
|
<field name="model">account.invoice</field>
|
|
<field name="inherit_id" ref="account_payment_partner.invoice_form" />
|
|
<field name="arch" type="xml">
|
|
<button name="%(account.action_account_invoice_payment)d" type="action" position="after">
|
|
<button name="create_account_payment_line" type="object"
|
|
string="Add to Debit Order"
|
|
groups="account_payment_order.group_account_payment"
|
|
attrs="{'invisible': ['|', ('payment_order_ok', '=', False), ('state', '!=', 'open')]}"/>
|
|
<!-- For customer refunds:
|
|
'Add to Direct Debit Order' will deduct the refund from a customer invoice
|
|
We could also need a button 'Add to Payment Order' to reimburse
|
|
a customer via wire transfer... but I prefer to keep things
|
|
simple ; to do that, the user should manually create a payment order
|
|
and select the move lines -->
|
|
</button>
|
|
<field name="payment_mode_id" position="after">
|
|
<field name="payment_order_ok" invisible="1"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<record id="invoice_supplier_form" model="ir.ui.view">
|
|
<field name="name">account_payment_order.invoice_supplier_form</field>
|
|
<field name="model">account.invoice</field>
|
|
<field name="inherit_id" ref="account_payment_partner.invoice_supplier_form" />
|
|
<field name="arch" type="xml">
|
|
<button name="%(account.action_account_invoice_payment)d" type="action" position="after">
|
|
<button name="create_account_payment_line" type="object"
|
|
string="Add to Payment Order"
|
|
groups="account_payment_order.group_account_payment"
|
|
attrs="{'invisible': ['|', ('payment_order_ok', '=', False), ('state', '!=', 'open')]}"/>
|
|
</button>
|
|
<field name="payment_mode_id" position="after">
|
|
<field name="payment_order_ok" invisible="1"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
</data>
|
|
</openerp>
|