It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are created/validated upon completion of transaction. To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice instead of the transactions. Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720 Was PR #24043 [FIX] add domain based on journal to payment tokens Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
29 lines
1.6 KiB
XML
29 lines
1.6 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="account_invoice_view_form_inherit_payment" model="ir.ui.view">
|
|
<field name="name">account.invoice.view.form.inherit.payment</field>
|
|
<field name="model">account.invoice</field>
|
|
<field name="inherit_id" ref="account.invoice_form"/>
|
|
<field name="arch" type="xml">
|
|
<!--
|
|
The user must capture/void the authorized transactions before registering a new payment.
|
|
-->
|
|
<xpath expr="//button[@id='account_invoice_payment_btn']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('state', '!=', 'open'), ('authorized_transaction_ids', '!=', [])]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@id='account_invoice_payment_btn']" position="after">
|
|
<field name="authorized_transaction_ids" invisible="1"/>
|
|
<button name="payment_action_capture" type="object"
|
|
string="Capture Transaction" class="oe_highlight"
|
|
attrs="{'invisible': ['|', ('state', '!=', 'open'), ('authorized_transaction_ids', '=', [])]}"/>
|
|
<button name="payment_action_void" type="object"
|
|
string="Void Transaction"
|
|
confirm="Are you sure you want to void the authorized transaction? This action can't be undone."
|
|
attrs="{'invisible': ['|', ('state', '!=', 'open'), ('authorized_transaction_ids', '=', [])]}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|