forked from data.coop/membersystem
Compare commits
4 commits
fix-migrat
...
main
Author | SHA1 | Date | |
---|---|---|---|
Benjamin Bach | 43d5dcbd52 | ||
Benjamin Bach | f5feda3414 | ||
Benjamin Bach | 3659cf40df | ||
Benjamin Bach | 8f3e8f06f0 |
|
@ -80,8 +80,8 @@ class Order(CreatedModifiedAbstract):
|
|||
is_paid = models.BooleanField(default=False, verbose_name=_("is paid"))
|
||||
|
||||
class Meta:
|
||||
verbose_name = pgettext_lazy("accounting term", "Order")
|
||||
verbose_name_plural = pgettext_lazy("accounting term", "Orders")
|
||||
verbose_name = pgettext_lazy("accounting", "Order")
|
||||
verbose_name_plural = pgettext_lazy("accounting", "Orders")
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"Order ID {self.display_id}"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block head_title %}
|
||||
{% trans "Order" %}
|
||||
{% trans "Order" context "accounting" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
@ -11,14 +11,14 @@
|
|||
<h2>Order: {{ order.id }}</h2>
|
||||
|
||||
<p>
|
||||
{% trans "Ordered" %}: {{ order.created }}<br>
|
||||
{% trans "Status" %}: {{ order.is_paid|yesno:_("paid,unpaid") }}
|
||||
{% trans "Ordered" context "accounting" %}: {{ order.created }}<br>
|
||||
{% trans "Status" context "accounting" %}: {{ order.is_paid|yesno:_("paid,unpaid") }}
|
||||
</p>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Item" %}</th>
|
||||
<th>{% trans "Item" context "accounting" %}</th>
|
||||
<th>{% trans "Quantity" %}</th>
|
||||
<th>{% trans "Price" %}</th>
|
||||
<th>{% trans "VAT" %}</th>
|
||||
|
|
|
@ -56,7 +56,7 @@ class BaseEmail(EmailMessage):
|
|||
c["request"] = self.request
|
||||
c["domain"] = site.domain
|
||||
c["site_name"] = site.name
|
||||
c["protocol"] = "http" if self.request and not self.request.is_secure() else "https"
|
||||
c["protocol"] = "https" # if self.request and not self.request.is_secure() else "https"
|
||||
return c
|
||||
|
||||
def get_body(self) -> str:
|
||||
|
@ -101,6 +101,7 @@ class InviteEmail(BaseEmail):
|
|||
def __init__(self, membership: Membership, request: HttpRequest, *args, **kwargs) -> None:
|
||||
self.membership = membership
|
||||
kwargs["user"] = membership.user
|
||||
kwargs["from_email"] = "kasserer@data.coop"
|
||||
super().__init__(request, *args, **kwargs)
|
||||
|
||||
def get_context_data(self) -> dict:
|
||||
|
@ -118,6 +119,7 @@ class OrderEmail(BaseEmail):
|
|||
def __init__(self, order: Order, request: HttpRequest, *args, **kwargs) -> None:
|
||||
self.order = order
|
||||
kwargs["user"] = order.member
|
||||
kwargs["from_email"] = "kasserer@data.coop"
|
||||
super().__init__(request, *args, **kwargs)
|
||||
|
||||
def get_context_data(self) -> dict:
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
{% extends "membership/emails/base.txt" %}{% load i18n %}
|
||||
|
||||
{% block content %}{% url 'order:detail' order_id=order.id as order_url %}{% blocktrans %}You have an order in our system, you can pay it here:
|
||||
{% block content %}{% url 'order:detail' order_id=order.id as order_url %}{% blocktrans %}You have an order in our system, which you can pay here:
|
||||
|
||||
{{ protocol }}://{{ domain }}{{ order_url }}
|
||||
|
||||
We used to handle membership stuff in a spreadsheet and via bank transfers. This is now all handled with our custom-made membership system. We hope you like it.
|
||||
|
||||
If you received this email and no longer want a membership, you can ignore it. But please let us know by writing board@data.coop, so we can erase any personal data we have about your previous membership.
|
||||
|
||||
Dansk:
|
||||
|
||||
Hej! Så kører medlemsystemet endeligt! Det er mega-fedt, fordi vi længe har haft besvær med manuelle procedurer. Nu har vi flyttet medlemsdata over på member.data.coop, og betalingen fungerer. Vi kan dermed fremover arbejde stille og roligt på at integrere systemet, så man kan styre sine services via medlemssystemet.
|
||||
|
||||
Hvis du ikke længere vil være medlem, kan du ignorere mailen her; men du må meget gerne informere os via board@data.coop, så vi kan slette evt. personlige data og services, du har kørende på dit tidligere medlemskab.
|
||||
|
||||
{% endblocktrans %}{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue