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

@@ -16,6 +16,13 @@ class PaymentToken(models.Model):
help="The unique card identifier stored on the Poynt platform.",
readonly=True,
)
poynt_payment_token = fields.Char(
string="Poynt Payment Token (JWT)",
help="Long-lived JWT issued by Poynt /cards/tokenize, used for "
"recurring charges via /cards/tokenize/charge.",
readonly=True,
groups='base.group_system',
)
def _poynt_validate_stored_card(self):
"""Validate that the stored card is still usable on Poynt.
@@ -35,7 +42,7 @@ class PaymentToken(models.Model):
)
try:
result = self.provider_id._poynt_make_request(
result = self.provider_id.sudo()._poynt_make_request(
'GET',
f'cards/{self.poynt_card_id}',
)