Files
Odoo-Modules/fusion_clover/views/payment_provider_views.xml
gsinghpal a2fe1fcbcc changes
2026-04-29 03:35:33 -04:00

71 lines
3.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="payment_provider_form" model="ir.ui.view">
<field name="name">Clover Provider Form</field>
<field name="model">payment.provider</field>
<field name="inherit_id" ref="payment.payment_provider_form"/>
<field name="arch" type="xml">
<group name="provider_credentials" position="inside">
<group invisible="code != 'clover'" name="clover_credentials">
<separator string="Merchant"/>
<field name="clover_merchant_id"
required="code == 'clover' and state != 'disabled'"
placeholder="e.g. 22701620015"/>
<separator string="Ecommerce API Tokens"/>
<field name="clover_api_key"
required="code == 'clover' and state != 'disabled'"
password="True"
placeholder="Private token from Ecommerce API Tokens page"/>
<field name="clover_public_key"
placeholder="Public token from Ecommerce API Tokens page"/>
<separator string="REST API / Terminal"/>
<field name="clover_rest_api_token"
password="True"
placeholder="From Clover Dashboard: Setup > API Tokens"/>
<separator string="Nexa Developer App (OAuth)"/>
<field name="clover_app_id"
placeholder="App ID from Clover Developer Dashboard"/>
<label for="clover_app_secret"/>
<div class="o_row" col="2">
<field name="clover_app_secret" password="True"/>
</div>
<field name="clover_remote_app_id"
placeholder="Remote App ID (RAID) - X-POS-Id header"/>
<separator string="OAuth Status (auto-populated by Connect to Clover)"/>
<field name="clover_oauth_access_token"
string="Access Token Status"
readonly="1"
password="True"/>
<field name="clover_oauth_token_expiry" readonly="1"/>
</group>
</group>
<group name="provider_credentials" position="after">
<group string="Clover Actions"
invisible="code != 'clover'" name="clover_actions"
col="4">
<button string="Connect to Clover"
type="object"
name="action_clover_oauth_connect"
class="btn-primary"
icon="fa-link"
invisible="not clover_app_id or not clover_app_secret"
colspan="2"
help="Redirects you to Clover to authorise this Odoo to act on the merchant's behalf. Required for terminal payments and webhooks."/>
<button string="Test Connection"
type="object"
name="action_clover_test_connection"
class="btn-secondary"
invisible="not clover_merchant_id or (not clover_api_key and not clover_rest_api_token and not clover_oauth_access_token)"
colspan="2"/>
</group>
<group string="Terminal Settings"
invisible="code != 'clover'" name="clover_terminal_settings">
<field name="clover_default_terminal_id"/>
</group>
</group>
</field>
</record>
</odoo>