Files
Odoo-Modules/fusion_poynt/views/payment_transaction_views.xml
gsinghpal e71bc503f9 changes
2026-02-25 09:40:41 -05:00

41 lines
1.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="payment_transaction_form_inherit_poynt" model="ir.ui.view">
<field name="name">payment.transaction.form.inherit.poynt</field>
<field name="model">payment.transaction</field>
<field name="inherit_id" ref="payment.payment_transaction_form"/>
<field name="arch" type="xml">
<!-- Voided banner at top of form -->
<xpath expr="//header" position="before">
<div class="alert alert-warning text-center mb-0"
role="alert"
invisible="not poynt_voided">
<strong>VOIDED</strong> — This transaction was voided on Poynt
on <field name="poynt_void_date" widget="datetime" readonly="1" class="d-inline"/>.
The payment has been reversed before settlement.
</div>
</xpath>
<!-- Void button in header -->
<xpath expr="//header/button[@name='action_void']" position="after">
<button string="Void Transaction"
name="action_poynt_void"
type="object"
class="btn-secondary"
invisible="state != 'done' or provider_code != 'poynt'"
confirm="Are you sure you want to void this transaction? This reverses the payment before settlement and cannot be undone. Only works same-day before closeout (6 PM)."/>
</xpath>
<!-- Add voided fields to the form sheet -->
<xpath expr="//field[@name='provider_reference']" position="after">
<field name="poynt_voided" invisible="1"/>
<field name="poynt_void_date" invisible="not poynt_voided"/>
</xpath>
</field>
</record>
</odoo>