Files
Odoo-Modules/fusion_clover/wizard/clover_refund_wizard_views.xml
gsinghpal 92369be6e0 changes
2026-03-20 11:46:41 -04:00

115 lines
5.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="clover_refund_wizard_form" model="ir.ui.view">
<field name="name">clover.refund.wizard.form</field>
<field name="model">clover.refund.wizard</field>
<field name="arch" type="xml">
<form string="Refund via Clover">
<!-- Success banner -->
<div class="alert alert-success text-center"
role="status"
invisible="state != 'done'">
<strong>Refund Processed Successfully</strong>
<p><field name="status_message" nolabel="1" readonly="1"/></p>
</div>
<!-- Error banner -->
<div class="alert alert-danger text-center"
role="alert"
invisible="state != 'error'">
<strong>Refund Failed</strong>
<p><field name="status_message" nolabel="1" readonly="1"/></p>
</div>
<!-- Non-referenced credit warning -->
<div class="alert alert-warning"
role="alert"
invisible="state != 'confirm' or refund_type != 'non_referenced'">
<strong><i class="fa fa-exclamation-triangle"/> Non-Referenced Credit Required</strong>
<p><field name="refund_type_note" nolabel="1" readonly="1"/></p>
</div>
<!-- Referenced refund info -->
<div class="alert alert-info"
role="status"
invisible="state != 'confirm' or refund_type != 'referenced'">
<i class="fa fa-info-circle"/>
<field name="refund_type_note" nolabel="1" readonly="1"/>
</div>
<group invisible="state == 'done'">
<group string="Refund Details">
<field name="credit_note_id" readonly="1"/>
<field name="original_invoice_id" readonly="1"/>
<field name="partner_id" readonly="1"/>
<field name="amount" readonly="state != 'confirm'"/>
<field name="currency_id" invisible="1"/>
<field name="refund_type" invisible="1"/>
<field name="transaction_age_days" readonly="1"/>
</group>
<group string="Original Payment">
<field name="provider_id" invisible="1"/>
<field name="provider_name"/>
<field name="original_transaction_id" readonly="1"/>
<field name="original_clover_charge_id" readonly="1"/>
<field name="card_info" readonly="1"
invisible="not card_info"/>
</group>
</group>
<!-- Terminal selector for non-referenced credits -->
<group string="Terminal (Optional)"
invisible="state != 'confirm' or refund_type != 'non_referenced'">
<field name="terminal_id"
options="{'no_create': True}"/>
<div colspan="2" class="text-muted small">
<i class="fa fa-info-circle"/>
Select a terminal if the customer's card is present.
Leave empty to issue the credit via the Clover API.
</div>
</group>
<footer>
<!-- Confirm state -->
<button string="Process Refund"
name="action_process_refund"
type="object"
class="btn-primary"
icon="fa-undo"
invisible="state != 'confirm'"
confirm="Are you sure you want to refund this amount? This cannot be undone."
data-hotkey="q"/>
<button string="Cancel"
class="btn-secondary"
special="cancel"
invisible="state != 'confirm'"
data-hotkey="x"/>
<!-- Done state -->
<button string="Send Receipt"
name="action_send_receipt"
type="object"
class="btn-primary"
icon="fa-envelope"
invisible="state != 'done'"
data-hotkey="s"/>
<button string="Close"
class="btn-secondary"
special="cancel"
invisible="state != 'done'"
data-hotkey="x"/>
<!-- Error state -->
<button string="Close"
class="btn-primary"
special="cancel"
invisible="state != 'error'"
data-hotkey="x"/>
</footer>
</form>
</field>
</record>
</odoo>