Rental orders no longer show the "Authorizer Required?" question or the Authorizer field. The sale type is automatically set to 'Rentals' when creating or confirming a rental order. Validation logic also skips authorizer checks for rental sale type. Made-with: Cursor
84 lines
3.9 KiB
XML
84 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="view_move_form_poynt_button" model="ir.ui.view">
|
|
<field name="name">account.move.form.poynt.button</field>
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_move_form"/>
|
|
<field name="priority">60</field>
|
|
<field name="arch" type="xml">
|
|
|
|
<!-- Poynt Refund smart button on invoices -->
|
|
<xpath expr="//div[@name='button_box']" position="inside">
|
|
<button name="action_view_poynt_refunds"
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-undo"
|
|
invisible="poynt_refund_count == 0">
|
|
<field name="poynt_refund_count" widget="statinfo" string="Poynt Refunds"/>
|
|
</button>
|
|
</xpath>
|
|
|
|
<!-- Collect payment button on invoices -->
|
|
<xpath expr="//button[@id='account_invoice_payment_btn']" position="after">
|
|
<button name="action_open_poynt_payment_wizard"
|
|
string="Collect Poynt Payment"
|
|
type="object"
|
|
class="btn-secondary"
|
|
icon="fa-credit-card"
|
|
invisible="state != 'posted' or payment_state not in ('not_paid', 'partial') or move_type != 'out_invoice'"
|
|
groups="fusion_poynt.group_fusion_poynt_user"
|
|
data-hotkey="p"/>
|
|
</xpath>
|
|
|
|
<!-- Refund via Poynt button on credit notes -->
|
|
<xpath expr="//button[@id='account_invoice_payment_btn']" position="after">
|
|
<button name="action_open_poynt_refund_wizard"
|
|
string="Refund via Poynt"
|
|
type="object"
|
|
class="btn-secondary"
|
|
icon="fa-undo"
|
|
invisible="state != 'posted' or payment_state not in ('not_paid', 'partial') or move_type != 'out_refund' or poynt_refunded"
|
|
groups="fusion_poynt.group_fusion_poynt_user"
|
|
data-hotkey="r"/>
|
|
</xpath>
|
|
|
|
<!-- Resend Receipt button on invoices (paid via Poynt) -->
|
|
<xpath expr="//button[@id='account_invoice_payment_btn']" position="after">
|
|
<button name="action_resend_poynt_receipt"
|
|
string="Resend Receipt"
|
|
type="object"
|
|
class="btn-secondary"
|
|
icon="fa-envelope"
|
|
invisible="state != 'posted' or move_type != 'out_invoice' or not has_poynt_receipt"
|
|
groups="fusion_poynt.group_fusion_poynt_user"/>
|
|
</xpath>
|
|
|
|
<!-- Resend Receipt button on credit notes (refunded via Poynt) -->
|
|
<xpath expr="//button[@id='account_invoice_payment_btn']" position="after">
|
|
<button name="action_resend_poynt_receipt"
|
|
string="Resend Refund Receipt"
|
|
type="object"
|
|
class="btn-secondary"
|
|
icon="fa-envelope"
|
|
invisible="state != 'posted' or move_type != 'out_refund' or not poynt_refunded"
|
|
groups="fusion_poynt.group_fusion_poynt_user"/>
|
|
</xpath>
|
|
|
|
<!-- Refunded banner on credit notes -->
|
|
<xpath expr="//header" position="before">
|
|
<div class="alert alert-info text-center mb-0"
|
|
role="status"
|
|
invisible="not poynt_refunded">
|
|
<strong>Refunded via Poynt</strong> — This credit note has been
|
|
refunded to the customer's card through Poynt.
|
|
</div>
|
|
<field name="poynt_refunded" invisible="1"/>
|
|
<field name="has_poynt_receipt" invisible="1"/>
|
|
</xpath>
|
|
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|