This commit is contained in:
gsinghpal
2026-03-26 15:16:51 -04:00
parent bd7275881f
commit 2563208f53
13 changed files with 329 additions and 15 deletions

View File

@@ -8,8 +8,15 @@
<field name="priority">60</field>
<field name="arch" type="xml">
<!-- Poynt Refund smart button on invoices -->
<!-- Poynt Transaction smart button -->
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_view_poynt_transactions"
type="object"
class="oe_stat_button"
icon="fa-credit-card"
invisible="poynt_transaction_count == 0">
<field name="poynt_transaction_count" widget="statinfo" string="Poynt Payments"/>
</button>
<button name="action_view_poynt_refunds"
type="object"
class="oe_stat_button"

View File

@@ -62,6 +62,51 @@
autocomplete="cc-name"/>
</div>
<!-- Billing address -->
<div class="mb-3 o_poynt_billing_section">
<label class="form-label fw-bold">Billing Address</label>
<div class="mb-2">
<input type="text" class="form-control"
id="poynt_billing_address"
name="billing_address"
placeholder="Street Address"
autocomplete="billing street-address"/>
</div>
<div class="row mb-2">
<div class="col-6">
<input type="text" class="form-control"
id="poynt_billing_city"
name="billing_city"
placeholder="City"
autocomplete="billing address-level2"/>
</div>
<div class="col-6">
<input type="text" class="form-control"
id="poynt_billing_state"
name="billing_state"
placeholder="Province / State"
autocomplete="billing address-level1"/>
</div>
</div>
<div class="row mb-2">
<div class="col-6">
<input type="text" class="form-control"
id="poynt_billing_zip"
name="billing_zip"
placeholder="Postal Code"
autocomplete="billing postal-code"/>
</div>
<div class="col-6">
<input type="text" class="form-control"
id="poynt_billing_country"
name="billing_country"
placeholder="Country Code (CA, US)"
maxlength="2"
autocomplete="billing country"/>
</div>
</div>
</div>
<!-- Card type selector (for terminal payments where card brand cannot be auto-detected) -->
<div class="mb-3 o_poynt_card_type_section" style="display:none;">
<label class="form-label">Card Type</label>
@@ -117,6 +162,17 @@
</select>
</div>
</div>
<!-- Processing overlay (hidden until payment is submitted) -->
<div class="o_poynt_processing_overlay" style="display:none;">
<div class="text-center p-4">
<div class="spinner-border text-primary mb-3" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<h5 class="o_poynt_processing_message">Processing your payment...</h5>
<p class="text-muted">Please do not close this page.</p>
</div>
</div>
</div>
</template>

View File

@@ -28,10 +28,16 @@
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 -->
<!-- Add Poynt fields and linked records after provider_reference -->
<xpath expr="//field[@name='provider_reference']" position="after">
<field name="poynt_voided" invisible="1"/>
<field name="poynt_void_date" invisible="not poynt_voided"/>
<field name="poynt_order_id" invisible="provider_code != 'poynt'" readonly="1"/>
<field name="poynt_transaction_id" invisible="provider_code != 'poynt'" readonly="1"/>
<field name="sale_order_ids" widget="many2many_tags" readonly="1"
string="Sale Orders"/>
<field name="invoice_ids" widget="many2many_tags" readonly="1"
string="Invoices"/>
</xpath>
</field>

View File

@@ -7,6 +7,18 @@
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="priority">60</field>
<field name="arch" type="xml">
<!-- Transaction count smart button -->
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_view_poynt_transactions"
type="object"
class="oe_stat_button"
icon="fa-credit-card"
invisible="poynt_transaction_count == 0">
<field name="poynt_transaction_count" widget="statinfo" string="Poynt Payments"/>
</button>
</xpath>
<!-- Collect Payment action button -->
<xpath expr="//button[@id='create_invoice']" position="after">
<button name="action_poynt_collect_payment"
string="Collect Payment"