feat: hide authorizer for rental orders, auto-set sale type
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
This commit is contained in:
@@ -5,28 +5,70 @@
|
||||
<field name="name">deposit.deduction.wizard.form</field>
|
||||
<field name="model">deposit.deduction.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Deduct Security Deposit">
|
||||
<form string="Process Security Deposit">
|
||||
<group>
|
||||
<group>
|
||||
<field name="order_id"/>
|
||||
<field name="deposit_total" widget="monetary"/>
|
||||
<field name="order_id" readonly="1"/>
|
||||
<field name="partner_id" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="deduction_amount" widget="monetary"/>
|
||||
<field name="remaining_preview" widget="monetary"/>
|
||||
<field name="deposit_total" widget="monetary"/>
|
||||
<field name="has_card_on_file" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<separator string="Action"/>
|
||||
<group>
|
||||
<field name="action_type" widget="radio"/>
|
||||
</group>
|
||||
|
||||
<!-- Deduction fields (partial / no refund) -->
|
||||
<group invisible="action_type not in ('partial_refund', 'no_refund')">
|
||||
<group>
|
||||
<field name="deduction_amount" widget="monetary"
|
||||
required="action_type in ('partial_refund', 'no_refund')"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remaining_preview" widget="monetary"
|
||||
invisible="action_type != 'partial_refund'"/>
|
||||
<field name="overage_preview" widget="monetary"
|
||||
decoration-danger="overage_preview > 0"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="reason" placeholder="Describe the damages or reason for deduction..."/>
|
||||
|
||||
<group invisible="action_type not in ('partial_refund', 'no_refund')">
|
||||
<field name="reason"
|
||||
required="action_type in ('partial_refund', 'no_refund')"
|
||||
placeholder="Describe the damages or reason for deduction..."/>
|
||||
</group>
|
||||
|
||||
<!-- Refund preview for full refund / sold -->
|
||||
<group invisible="action_type not in ('full_refund', 'sold')">
|
||||
<field name="refund_preview" widget="monetary" string="Amount to Refund"/>
|
||||
</group>
|
||||
|
||||
<!-- Sold note -->
|
||||
<div class="alert alert-info" role="alert"
|
||||
invisible="action_type != 'sold'">
|
||||
<i class="fa fa-info-circle me-2"/>
|
||||
The full security deposit will be refunded to the customer's card.
|
||||
The rental will be marked as sold and an activity will be created for follow-up.
|
||||
</div>
|
||||
|
||||
<!-- Refund method note -->
|
||||
<div class="alert alert-warning" role="alert"
|
||||
invisible="has_card_on_file or action_type in ('no_refund',)">
|
||||
<i class="fa fa-exclamation-triangle me-2"/>
|
||||
No card on file. The refund will need to be processed manually.
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<button name="action_confirm_deduction"
|
||||
string="Confirm Deduction"
|
||||
<button name="action_confirm"
|
||||
string="Process Deposit"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
icon="fa-check"/>
|
||||
icon="fa-check"
|
||||
confirm="This will process the deposit and close the rental. Continue?"/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user