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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user