Add carrier field to Refund model and update Stripe views
Introduces a OneToOneField for carrier in the Refund model to support future integration and refactoring. Adds and updates TODO comments for email template usage, error handling in Stripe webhooks, and clarifies logic placement in Stripe models.
This commit is contained in:
@@ -546,7 +546,15 @@ class Refund(models.Model):
|
||||
"return_reason": return_reason,
|
||||
}
|
||||
|
||||
#TODO: přesunou zásilkovna field tady taky (ostranit z order několik balíku)
|
||||
#TODO: přesunou zásilkovna field tady taky (zkontrolovat jestli jsou views napojené a použít metodu send z carrier)
|
||||
carrier = models.OneToOneField(
|
||||
"Carrier",
|
||||
on_delete=models.CASCADE,
|
||||
related_name="refund",
|
||||
null=True,
|
||||
blank=True
|
||||
)
|
||||
|
||||
|
||||
html_string = render_to_string("refund/customer_in_package_returning_form.html", context)
|
||||
pdf_bytes = HTML(string=html_string).write_pdf()
|
||||
|
||||
Reference in New Issue
Block a user