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:
gsinghpal
2026-02-25 23:33:23 -05:00
parent 3c8f83b8e6
commit 14fe9ab716
51 changed files with 4192 additions and 822 deletions

View File

@@ -1,16 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Manual Renewal Wizard Form -->
<record id="manual_renewal_wizard_view_form" model="ir.ui.view">
<field name="name">manual.renewal.wizard.form</field>
<field name="model">manual.renewal.wizard</field>
<field name="arch" type="xml">
<form string="Renew Rental">
<field name="previous_start_date" invisible="1"/>
<field name="previous_return_date" invisible="1"/>
<field name="renewal_invoice_id" invisible="1"/>
<field name="renewal_log_id" invisible="1"/>
<group>
<field name="order_id" readonly="1"/>
<field name="partner_id" readonly="1"/>
</group>
<separator string="Current Rental Period"/>
<group>
<group>
@@ -20,6 +25,7 @@
<field name="current_return_date" readonly="1"/>
</group>
</group>
<separator string="New Rental Period"/>
<group>
<group>
@@ -29,15 +35,36 @@
<field name="new_return_date"/>
</group>
</group>
<group>
<field name="amount_preview" widget="monetary"/>
</group>
<separator string="Payment"/>
<group>
<group>
<field name="payment_token_id"/>
</group>
<group>
<field name="use_card_on_file" widget="boolean_toggle"/>
</group>
</group>
<footer>
<button name="action_confirm_renewal"
type="object"
string="Confirm Renewal &amp; Collect Payment"
class="btn-primary"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
class="btn-primary"
invisible="not use_card_on_file"/>
<button name="action_confirm_renewal"
type="object"
string="Confirm Renewal &amp; Open Payment"
class="btn-primary"
invisible="use_card_on_file"/>
<button name="action_cancel_renewal"
type="object"
string="Cancel"
class="btn-secondary"/>
</footer>
</form>
</field>