Compare commits

..

4 commits

Author SHA1 Message Date
Benjamin Bach 43d5dcbd52 Set FROM field on emails (#55)
All checks were successful
continuous-integration/drone/push Build is passing
Fixes #54

Reviewed-on: data.coop/membersystem#55
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 20:44:11 +00:00
Benjamin Bach f5feda3414 Fix invite text and add accounting context to translation messages (#53)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: data.coop/membersystem#53
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 19:52:09 +00:00
Benjamin Bach 3659cf40df Add more precision to the order email (#51)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: data.coop/membersystem#51
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 10:08:01 +00:00
Benjamin Bach 8f3e8f06f0 Remove unique constraint from initial field (#50)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: data.coop/membersystem#50
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 09:37:13 +00:00
4 changed files with 21 additions and 8 deletions

View file

@ -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}"

View file

@ -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>

View file

@ -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:

View file

@ -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 %}