mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Finalise the wizard of selection of move lines to pay
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/...
This commit is contained in:
55
account_payment_order/views/account_invoice_view.xml
Normal file
55
account_payment_order/views/account_invoice_view.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?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>
|
||||
@@ -19,6 +19,16 @@
|
||||
<field name="default_invoice"/>
|
||||
<field name="default_date_type"/>
|
||||
</group>
|
||||
<group name="trf-move-config" string="Accounting Entries Options">
|
||||
<field name="transfer_move"/>
|
||||
<field name="transfer_account_id"
|
||||
attrs="{'invisible': [('transfer_move', '=', False)], 'required': [('transfer_move', '=', True)]}"
|
||||
context="{'default_internal_type': 'other', 'default_reconcile': True, 'default_company_id': company_id}"/>
|
||||
<field name="transfer_journal_id"
|
||||
attrs="{'invisible': [('transfer_move', '=', False)], 'required': [('transfer_move', '=', True)]}"/>
|
||||
<field name="transfer_move_option"
|
||||
attrs="{'invisible': [('transfer_move', '=', False)], 'required': [('transfer_move', '=', True)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -88,6 +88,11 @@
|
||||
<field name="model">account.payment.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Payment Orders">
|
||||
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]"/>
|
||||
<filter name="open" string="Confirmed" domain="[('state', '=', 'open')]"/>
|
||||
<filter name="generated" string="File Generated" domain="[('state', '=', 'generated')]"/>
|
||||
<filter name="uploaded" string="File Uploaded" domain="[('state', '=', 'uploaded')]"/>
|
||||
<filter name="done" string="Done" domain="[('state', '=', 'done')]"/>
|
||||
<group string="Group By" name="groupby">
|
||||
<filter name="payment_mode_groupby" string="Payment Mode" context="{'group_by': 'payment_mode_id'}"/>
|
||||
<filter name="journal_groupby" string="Bank Journal" context="{'group_by': 'journal_id'}"/>
|
||||
@@ -98,10 +103,33 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_payment_order_graph" model="ir.ui.view">
|
||||
<field name="name">account.payment.order.graph</field>
|
||||
<field name="model">account.payment.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Payment Orders">
|
||||
<field name="date_generated" type="row" interval="month"/>
|
||||
<field name="total_company_currency" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_payment_order_pivot" model="ir.ui.view">
|
||||
<field name="name">account.payment.order.pivot</field>
|
||||
<field name="model">account.payment.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Payment Orders">
|
||||
<field name="date_generated" type="row" interval="month"/>
|
||||
<field name="total_company_currency" type="measure"/>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="account_payment_order_outbound_action" model="ir.actions.act_window">
|
||||
<field name="name">Payment Orders</field>
|
||||
<field name="res_model">account.payment.order</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form,pivot,graph</field>
|
||||
<field name="domain">[('payment_type', '=', 'outbound')]</field>
|
||||
<field name="context">{'default_payment_type': 'outbound'}</field>
|
||||
</record>
|
||||
@@ -109,7 +137,7 @@
|
||||
<record id="account_payment_order_inbound_action" model="ir.actions.act_window">
|
||||
<field name="name">Debit Orders</field>
|
||||
<field name="res_model">account.payment.order</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form,pivot,graph</field>
|
||||
<field name="domain">[('payment_type', '=', 'inbound')]</field>
|
||||
<field name="context">{'default_payment_type': 'inbound'}</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user