This commit is contained in:
gsinghpal
2026-03-13 12:38:28 -04:00
parent db4b9aa278
commit fc3c966484
2975 changed files with 1614 additions and 498 deletions

View File

@@ -1091,6 +1091,23 @@ class SaleOrder(models.Model):
"Card reauthorization form sent to customer."
))
def action_open_card_authorization(self):
"""Open the card authorization form in the browser for phone authorization."""
self.ensure_one()
self.rental_agreement_token = uuid.uuid4().hex
base_url = self.env['ir.config_parameter'].sudo().get_param(
'web.base.url', '',
)
url = (
f"{base_url}/rental/reauthorize/"
f"{self.id}/{self.rental_agreement_token}"
)
return {
'type': 'ir.actions.act_url',
'url': url,
'target': 'new',
}
def _process_post_signing_payments(self):
"""Auto-collect payments after the customer signs the agreement.