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

@@ -67,7 +67,10 @@ class RentalCancellationRequest(models.Model):
def action_confirm(self):
"""Confirm the cancellation and stop auto-renewal."""
self.ensure_one()
self.order_id.write({'rental_auto_renew': False})
self.order_id.write({
'rental_auto_renew': False,
'rental_auto_renew_off_reason': f"Customer requested cancellation ({self.reason or 'No reason provided'})",
})
self.write({'state': 'confirmed'})
self._schedule_pickup_activity()
self._send_cancellation_confirmation()