Compare commits

..

No commits in common. "cfd0d735ac3196568e9b06ee47a217bf9e638a25" and "8f3e8f06f000aeb6c0b9d092e3a0b6c89ba7daf3" have entirely different histories.

4 changed files with 8 additions and 21 deletions

View file

@ -80,8 +80,8 @@ class Order(CreatedModifiedAbstract):
is_paid = models.BooleanField(default=False, verbose_name=_("is paid")) is_paid = models.BooleanField(default=False, verbose_name=_("is paid"))
class Meta: class Meta:
verbose_name = pgettext_lazy("accounting", "Order") verbose_name = pgettext_lazy("accounting term", "Order")
verbose_name_plural = pgettext_lazy("accounting", "Orders") verbose_name_plural = pgettext_lazy("accounting term", "Orders")
def __str__(self) -> str: def __str__(self) -> str:
return f"Order ID {self.display_id}" return f"Order ID {self.display_id}"

View file

@ -2,7 +2,7 @@
{% load i18n %} {% load i18n %}
{% block head_title %} {% block head_title %}
{% trans "Order" context "accounting" %} {% trans "Order" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
@ -11,14 +11,14 @@
<h2>Order: {{ order.id }}</h2> <h2>Order: {{ order.id }}</h2>
<p> <p>
{% trans "Ordered" context "accounting" %}: {{ order.created }}<br> {% trans "Ordered" %}: {{ order.created }}<br>
{% trans "Status" context "accounting" %}: {{ order.is_paid|yesno:_("paid,unpaid") }} {% trans "Status" %}: {{ order.is_paid|yesno:_("paid,unpaid") }}
</p> </p>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>{% trans "Item" context "accounting" %}</th> <th>{% trans "Item" %}</th>
<th>{% trans "Quantity" %}</th> <th>{% trans "Quantity" %}</th>
<th>{% trans "Price" %}</th> <th>{% trans "Price" %}</th>
<th>{% trans "VAT" %}</th> <th>{% trans "VAT" %}</th>

View file

@ -56,7 +56,7 @@ class BaseEmail(EmailMessage):
c["request"] = self.request c["request"] = self.request
c["domain"] = site.domain c["domain"] = site.domain
c["site_name"] = site.name c["site_name"] = site.name
c["protocol"] = "https" # if self.request and not self.request.is_secure() else "https" c["protocol"] = "http" if self.request and not self.request.is_secure() else "https"
return c return c
def get_body(self) -> str: def get_body(self) -> str:
@ -101,7 +101,6 @@ class InviteEmail(BaseEmail):
def __init__(self, membership: Membership, request: HttpRequest, *args, **kwargs) -> None: def __init__(self, membership: Membership, request: HttpRequest, *args, **kwargs) -> None:
self.membership = membership self.membership = membership
kwargs["user"] = membership.user kwargs["user"] = membership.user
kwargs["from_email"] = "kasserer@data.coop"
super().__init__(request, *args, **kwargs) super().__init__(request, *args, **kwargs)
def get_context_data(self) -> dict: def get_context_data(self) -> dict:
@ -119,7 +118,6 @@ class OrderEmail(BaseEmail):
def __init__(self, order: Order, request: HttpRequest, *args, **kwargs) -> None: def __init__(self, order: Order, request: HttpRequest, *args, **kwargs) -> None:
self.order = order self.order = order
kwargs["user"] = order.member kwargs["user"] = order.member
kwargs["from_email"] = "kasserer@data.coop"
super().__init__(request, *args, **kwargs) super().__init__(request, *args, **kwargs)
def get_context_data(self) -> dict: def get_context_data(self) -> dict:

View file

@ -1,17 +1,6 @@
{% extends "membership/emails/base.txt" %}{% load i18n %} {% 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, which you can pay here: {% 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:
{{ protocol }}://{{ domain }}{{ order_url }} {{ 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 %} {% endblocktrans %}{% endblock %}