changes
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user