Orders content_object_repr for deleted content_objects

This commit is contained in:
Marc Aymerich 2015-07-15 12:13:03 +00:00
parent caa087deb6
commit 857f0c0958
11 changed files with 306 additions and 140 deletions

View file

@ -424,3 +424,6 @@ Colaesce('total', 'computed_total')
Case Case
# case on payment transaction state ? case when trans.amount > # case on payment transaction state ? case when trans.amount >
# ORDERS keep content_object verbose name for deleted objects

View file

@ -109,7 +109,7 @@ def admin_link(*args, **kwargs):
return '---' return '---'
display = kwargs.get('display') display = kwargs.get('display')
if display: if display:
display = getattr(obj, display, 'merda') display = getattr(obj, display, None)
else: else:
display = obj display = obj
try: try:

View file

@ -20,24 +20,36 @@ class Domain(models.Model):
top = models.ForeignKey('domains.Domain', null=True, related_name='subdomain_set', top = models.ForeignKey('domains.Domain', null=True, related_name='subdomain_set',
editable=False) editable=False)
serial = models.IntegerField(_("serial"), default=utils.generate_zone_serial, editable=False, serial = models.IntegerField(_("serial"), default=utils.generate_zone_serial, editable=False,
help_text=_("A timestamp that changes whenever you update your domain.")) help_text=_("A revision number that changes whenever you update your domain."))
refresh = models.IntegerField(_("refresh"), null=True, blank=True, refresh = models.IntegerField(_("refresh"), null=True, blank=True,
validators=[validators.validate_zone_interval], validators=[validators.validate_zone_interval],
help_text=_("The number of seconds before the zone should be refreshed " help_text=_("The time a secondary DNS server waits before querying the primary DNS "
"(<tt>%s</tt> by default).") % settings.DOMAINS_DEFAULT_REFRESH) "server's SOA record to check for changes. When the refresh time expires, "
"the secondary DNS server requests a copy of the current SOA record from "
"the primary. The primary DNS server complies with this request. "
"The secondary DNS server compares the serial number of the primary DNS "
"server's current SOA record and the serial number in it's own SOA record. "
"If they are different, the secondary DNS server will request a zone "
"transfer from the primary DNS server. "
"The default value is <tt>%s</tt>.") % settings.DOMAINS_DEFAULT_REFRESH)
retry = models.IntegerField(_("retry"), null=True, blank=True, retry = models.IntegerField(_("retry"), null=True, blank=True,
validators=[validators.validate_zone_interval], validators=[validators.validate_zone_interval],
help_text=_("The number of seconds before a failed refresh should be retried " help_text=_("The time a secondary server waits before retrying a failed zone transfer. "
"(<tt>%s</tt> by default).") % settings.DOMAINS_DEFAULT_RETRY) "Normally, the retry time is less than the refresh time. "
"The default value is <tt>%s</tt>.") % settings.DOMAINS_DEFAULT_RETRY)
expire = models.IntegerField(_("expire"), null=True, blank=True, expire = models.IntegerField(_("expire"), null=True, blank=True,
validators=[validators.validate_zone_interval], validators=[validators.validate_zone_interval],
help_text=_("The upper limit in seconds before a zone is considered no longer " help_text=_("The time that a secondary server will keep trying to complete a zone "
"authoritative (<tt>%s</tt> by default).") % settings.DOMAINS_DEFAULT_EXPIRE) "transfer. If this time expires prior to a successful zone transfer, "
min_ttl = models.IntegerField(_("refresh"), null=True, blank=True, "the secondary server will expire its zone file. This means the secondary "
"will stop answering queries. "
"The default value is <tt>%s</tt>.") % settings.DOMAINS_DEFAULT_EXPIRE)
min_ttl = models.IntegerField(_("min TTL"), null=True, blank=True,
validators=[validators.validate_zone_interval], validators=[validators.validate_zone_interval],
help_text=_("The negative result TTL (for example, how long a resolver should " help_text=_("The minimum time-to-live value applies to all resource records in the "
"consider a negative result for a subdomain to be valid before retrying) " "zone file. This value is supplied in query responses to inform other "
"(<tt>%s</tt> by default).") % settings.DOMAINS_DEFAULT_MIN_TTL) "servers how long they should keep the data in cache. "
"The default value is <tt>%s</tt>.") % settings.DOMAINS_DEFAULT_MIN_TTL)
def __str__(self): def __str__(self):
return self.name return self.name

View file

@ -1,5 +1,5 @@
from django.contrib import admin from django.contrib import admin
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse, NoReverseMatch
from django.db.models import Prefetch from django.db.models import Prefetch
from django.utils import timezone from django.utils import timezone
from django.utils.html import escape from django.utils.html import escape
@ -7,7 +7,7 @@ from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.admin import ExtendedModelAdmin from orchestra.admin import ExtendedModelAdmin
from orchestra.admin.utils import admin_link, admin_date from orchestra.admin.utils import admin_link, admin_date, change_url
from orchestra.contrib.accounts.admin import AccountAdminMixin from orchestra.contrib.accounts.admin import AccountAdminMixin
from orchestra.utils.humanize import naturaldate from orchestra.utils.humanize import naturaldate
@ -60,18 +60,33 @@ class OrderAdmin(AccountAdminMixin, ExtendedModelAdmin):
date_hierarchy = 'registered_on' date_hierarchy = 'registered_on'
inlines = (MetricStorageInline,) inlines = (MetricStorageInline,)
add_inlines = () add_inlines = ()
search_fields = ('account__username', 'description') search_fields = ('account__username', 'content_object_repr', 'description',)
list_prefetch_related = ( list_prefetch_related = (
'content_object', 'content_object',
Prefetch('metrics', queryset=MetricStorage.objects.order_by('-id')), Prefetch('metrics', queryset=MetricStorage.objects.order_by('-id')),
) )
list_select_related = ('account', 'service') list_select_related = ('account', 'service')
readonly_fields = ('content_object_repr', 'content_object_link')
service_link = admin_link('service') service_link = admin_link('service')
content_object_link = admin_link('content_object', order=False)
display_registered_on = admin_date('registered_on') display_registered_on = admin_date('registered_on')
display_cancelled_on = admin_date('cancelled_on') display_cancelled_on = admin_date('cancelled_on')
def content_object_link(self, order):
if order.content_object:
try:
url = change_url(order.content_object)
except NoReverseMatch:
# Does not has admin
return order.content_object_repr
description = str(order.content_object)
return '<a href="{url}">{description}</a>'.format(
url=url, description=description)
return order.content_object_repr
content_object_link.short_description = _("Content object")
content_object_link.allow_tags = True
content_object_link.admin_order_field = 'content_object_repr'
def display_billed_until(self, order): def display_billed_until(self, order):
billed_until = order.billed_until billed_until = order.billed_until
red = False red = False

View file

@ -118,6 +118,8 @@ class Order(models.Model):
billed_until = models.DateField(_("billed until"), null=True, blank=True) billed_until = models.DateField(_("billed until"), null=True, blank=True)
ignore = models.BooleanField(_("ignore"), default=False) ignore = models.BooleanField(_("ignore"), default=False)
description = models.TextField(_("description"), blank=True) description = models.TextField(_("description"), blank=True)
content_object_repr = models.CharField(_("content object representation"), max_length=256,
editable=False)
content_object = GenericForeignKey() content_object = GenericForeignKey()
objects = OrderQuerySet.as_manager() objects = OrderQuerySet.as_manager()
@ -146,8 +148,12 @@ class Order(models.Model):
# New account workaround -> user.account_id == None # New account workaround -> user.account_id == None
continue continue
ignore = service.handler.get_ignore(instance) ignore = service.handler.get_ignore(instance)
order = cls(content_object=instance, service=service, order = cls(
account_id=account_id, ignore=ignore) content_object=instance,
content_object_repr=str(instance),
service=service,
account_id=account_id,
ignore=ignore)
if commit: if commit:
order.save() order.save()
updates.append((order, 'created')) updates.append((order, 'created'))
@ -187,9 +193,16 @@ class Order(models.Model):
logger.info("UPDATED order id:{id}, description:{description}{metric}".format( logger.info("UPDATED order id:{id}, description:{description}{metric}".format(
id=self.id, description=description, metric=metric).encode('ascii', 'replace') id=self.id, description=description, metric=metric).encode('ascii', 'replace')
) )
update_fields = []
if self.description != description: if self.description != description:
self.description = description self.description = description
self.save(update_fields=['description']) update_fields.append('description')
content_object_repr = str(instance)
if self.content_object_repr != content_object_repr:
self.content_object_repr = content_object_repr
update_fields.append('content_object_repr')
if update_fields:
self.save(update_fields=update_fields)
def cancel(self, commit=True): def cancel(self, commit=True):
self.cancelled_on = timezone.now() self.cancelled_on = timezone.now()

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-28 16:40+0000\n" "POT-Creation-Date: 2015-07-15 12:08+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,133 +18,154 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: actions.py:21 #: actions.py:24
msgid "Selected transactions must be on '{state}' state" msgid "Selected transactions must be on '{state}' state"
msgstr "" msgstr ""
#: actions.py:30 #: actions.py:34
msgid "Processed" msgid "Processed"
msgstr "" msgstr ""
#: actions.py:37 #: actions.py:41
msgid "Selected transaction has been processed." msgid "One selected transaction has been processed."
msgstr "" msgstr ""
#: actions.py:38 #: actions.py:42
#, python-format #, python-format
msgid "%s Selected transactions have been processed." msgid "%s Selected transactions have been processed."
msgstr "" msgstr ""
#: actions.py:41 #: actions.py:45
msgid "" msgid ""
"The following transaction process has been generated, you may want to save " "The following transaction process has been generated, you may want to save "
"it on your computer now." "it on your computer now."
msgstr "" msgstr ""
#: actions.py:43 #: actions.py:47
#, python-format #, python-format
msgid "" msgid ""
"The following %s transaction processes have been generated, you may want to " "The following %s transaction processes have been generated, you may want to "
"save it on your computer now." "save it on your computer now."
msgstr "" msgstr ""
#: actions.py:46 #: actions.py:50
msgid "Process" msgid "Process"
msgstr "" msgstr ""
#: actions.py:59 actions.py:130 models.py:93 models.py:161 #: actions.py:63 actions.py:134 models.py:97 models.py:164
msgid "Executed" msgid "Executed"
msgstr "" msgstr ""
#: actions.py:62 #: actions.py:66
msgid "One selected transaction has been marked as executed." msgid "One selected transaction has been marked as executed."
msgstr "" msgstr ""
#: actions.py:63 #: actions.py:67
#, python-format #, python-format
msgid "%s selected transactions have been marked as executed." msgid "%s selected transactions have been marked as executed."
msgstr "" msgstr ""
#: actions.py:67 actions.py:138 #: actions.py:71 actions.py:142
msgid "Mark as executed" msgid "Mark as executed"
msgstr "" msgstr ""
#: actions.py:75 models.py:94 #: actions.py:79 models.py:98
msgid "Secured" msgid "Secured"
msgstr "" msgstr ""
#: actions.py:78 #: actions.py:82
msgid "One selected transaction has been marked as secured." msgid "One selected transaction has been marked as secured."
msgstr "" msgstr ""
#: actions.py:79 #: actions.py:83
#, python-format #, python-format
msgid "%s selected transactions have been marked as secured." msgid "%s selected transactions have been marked as secured."
msgstr "" msgstr ""
#: actions.py:83 #: actions.py:87
msgid "Mark as secured" msgid "Mark as secured"
msgstr "" msgstr ""
#: actions.py:91 actions.py:162 models.py:95 #: actions.py:95 actions.py:166 models.py:99
msgid "Rejected" msgid "Rejected"
msgstr "" msgstr ""
#: actions.py:94 actions.py:165 #: actions.py:98 actions.py:169
msgid "One selected transaction has been marked as rejected." msgid "One selected transaction has been marked as rejected."
msgstr "" msgstr ""
#: actions.py:95 actions.py:166 #: actions.py:99 actions.py:170
#, python-format #, python-format
msgid "%s selected transactions have been marked as rejected." msgid "%s selected transactions have been marked as rejected."
msgstr "" msgstr ""
#: actions.py:99 #: actions.py:103
msgid "Mark as rejected" msgid "Mark as rejected"
msgstr "" msgstr ""
#: actions.py:133 #: actions.py:137
msgid "One selected process has been marked as executed." msgid "One selected process has been marked as executed."
msgstr "" msgstr ""
#: actions.py:134 #: actions.py:138
#, python-format #, python-format
msgid "%s selected processes have been marked as executed." msgid "%s selected processes have been marked as executed."
msgstr "" msgstr ""
#: actions.py:146 models.py:162 #: actions.py:150 models.py:165
msgid "Aborted" msgid "Aborted"
msgstr "" msgstr ""
#: actions.py:149 #: actions.py:153
msgid "One selected process has been aborted." msgid "One selected process has been aborted."
msgstr "" msgstr ""
#: actions.py:150 #: actions.py:154
#, python-format #, python-format
msgid "%s selected processes have been aborted." msgid "%s selected processes have been aborted."
msgstr "" msgstr ""
#: actions.py:154 #: actions.py:158
msgid "Abort" msgid "Abort"
msgstr "" msgstr ""
#: actions.py:170 #: actions.py:174
msgid "Commit" msgid "Commit"
msgstr "" msgstr ""
#: admin.py:42 #: admin.py:43
msgid "ID" msgid "ID"
msgstr "" msgstr ""
#: admin.py:101 #: admin.py:105
msgid "proc" msgid "proc"
msgstr "" msgstr ""
#: admin.py:152 #: admin.py:158
msgid "Transactions" msgid "Transactions"
msgstr "" msgstr ""
#: helpers.py:11
msgid "No transaction process selected."
msgstr ""
#: helpers.py:15
msgid "Done nothing. Not all related transactions in waitting execution."
msgstr ""
#: helpers.py:32
msgid "Unprocessed"
msgstr ""
#: helpers.py:34
#, python-format
msgid ""
"One related transaction has been marked as <i>waitting for processing</i>"
msgid_plural ""
"%i related transactions have been marked as <i>waitting for processing</i>."
msgstr[0] ""
msgstr[1] ""
#: methods/creditcard.py:11 #: methods/creditcard.py:11
msgid "Label" msgid "Label"
msgstr "" msgstr ""
@ -165,86 +186,123 @@ msgstr ""
msgid "SEPA Direct Debit" msgid "SEPA Direct Debit"
msgstr "" msgstr ""
#: methods/sepadirectdebit.py:48 #: models.py:20
msgid ""
"This bill will be automatically charged to your bank account with IBAN "
"number<br><strong>%s</strong>."
msgstr ""
"Aquesta factura es cobrarà automaticament en el teu compte bancari amb IBAN "
"<br><strong>%s</strong>."
#: models.py:19
msgid "account" msgid "account"
msgstr "" msgstr ""
#: models.py:21 #: models.py:22
msgid "method" msgid "method"
msgstr "" msgstr ""
#: models.py:23 models.py:166 #: models.py:24 models.py:169
msgid "data" msgid "data"
msgstr "" msgstr ""
#: models.py:24 #: models.py:25
msgid "active" msgid "active"
msgstr "" msgstr ""
#: models.py:91 #: models.py:95
msgid "Waitting processing" msgid "Waitting processing"
msgstr "" msgstr ""
#: models.py:92 #: models.py:96
msgid "Waitting execution" msgid "Waitting execution"
msgstr "" msgstr ""
#: models.py:98 #: models.py:102
msgid "bill" msgid "bill"
msgstr "" msgstr ""
#: models.py:101 #: models.py:105
msgid "source" msgid "source"
msgstr "" msgstr ""
#: models.py:103 #: models.py:107
msgid "process" msgid "process"
msgstr "" msgstr ""
#: models.py:104 models.py:168 #: models.py:108 models.py:171
msgid "state" msgid "state"
msgstr "" msgstr ""
#: models.py:106 #: models.py:110
msgid "amount" msgid "amount"
msgstr "" msgstr ""
#: models.py:108 models.py:169 #: models.py:112 models.py:172
msgid "created" msgid "created"
msgstr "" msgstr ""
#: models.py:109 #: models.py:113
msgid "modified" msgid "modified"
msgstr "" msgstr ""
#: models.py:124 #: models.py:128
msgid "New transactions can not be allocated for this bill." msgid "New transactions can not be allocated for this bill."
msgstr "" msgstr ""
#: models.py:160 #: models.py:163 templates/admin/payments/transaction/report.html:63
msgid "Created" msgid "Created"
msgstr "" msgstr ""
#: models.py:163 #: models.py:166
msgid "Commited" msgid "Commited"
msgstr "" msgstr ""
#: models.py:167 #: models.py:170
msgid "file" msgid "file"
msgstr "" msgstr ""
#: models.py:170 #: models.py:173
msgid "updated" msgid "updated"
msgstr "" msgstr ""
#: models.py:173 #: models.py:176
msgid "Transaction processes" msgid "Transaction processes"
msgstr "" msgstr ""
#: settings.py:12
#, fuzzy, python-format
#| msgid ""
#| "This bill will be automatically charged to your bank account with IBAN "
#| "number<br><strong>%s</strong>."
msgid ""
"<strong>Direct debit</strong>, this bill will be automatically charged to "
"your bank account with IBAN number<br><strong>%(number)s</strong>."
msgstr ""
"<strong>Càrrec per domiciliació</strong>, aquesta factura es cobrarà "
"automaticament en el teu compte bancari amb IBAN <br><strong>%s</strong>."
#: templates/admin/payments/transaction/report.html:38
msgid "Summary"
msgstr ""
#: templates/admin/payments/transaction/report.html:39
#: templates/admin/payments/transaction/report.html:61
msgid "Amount"
msgstr ""
#: templates/admin/payments/transaction/report.html:48
msgid "TOTAL"
msgstr ""
#: templates/admin/payments/transaction/report.html:57
msgid "Bill"
msgstr ""
#: templates/admin/payments/transaction/report.html:58
msgid "Account"
msgstr ""
#: templates/admin/payments/transaction/report.html:59
msgid "Contact"
msgstr ""
#: templates/admin/payments/transaction/report.html:62
msgid "State"
msgstr ""
#: templates/admin/payments/transaction/report.html:64
msgid "Updated"
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-28 16:40+0000\n" "POT-Creation-Date: 2015-07-15 12:08+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,133 +18,154 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: actions.py:21 #: actions.py:24
msgid "Selected transactions must be on '{state}' state" msgid "Selected transactions must be on '{state}' state"
msgstr "" msgstr ""
#: actions.py:30 #: actions.py:34
msgid "Processed" msgid "Processed"
msgstr "" msgstr ""
#: actions.py:37 #: actions.py:41
msgid "Selected transaction has been processed." msgid "One selected transaction has been processed."
msgstr "" msgstr ""
#: actions.py:38 #: actions.py:42
#, python-format #, python-format
msgid "%s Selected transactions have been processed." msgid "%s Selected transactions have been processed."
msgstr "" msgstr ""
#: actions.py:41 #: actions.py:45
msgid "" msgid ""
"The following transaction process has been generated, you may want to save " "The following transaction process has been generated, you may want to save "
"it on your computer now." "it on your computer now."
msgstr "" msgstr ""
#: actions.py:43 #: actions.py:47
#, python-format #, python-format
msgid "" msgid ""
"The following %s transaction processes have been generated, you may want to " "The following %s transaction processes have been generated, you may want to "
"save it on your computer now." "save it on your computer now."
msgstr "" msgstr ""
#: actions.py:46 #: actions.py:50
msgid "Process" msgid "Process"
msgstr "" msgstr ""
#: actions.py:59 actions.py:130 models.py:93 models.py:161 #: actions.py:63 actions.py:134 models.py:97 models.py:164
msgid "Executed" msgid "Executed"
msgstr "" msgstr ""
#: actions.py:62 #: actions.py:66
msgid "One selected transaction has been marked as executed." msgid "One selected transaction has been marked as executed."
msgstr "" msgstr ""
#: actions.py:63 #: actions.py:67
#, python-format #, python-format
msgid "%s selected transactions have been marked as executed." msgid "%s selected transactions have been marked as executed."
msgstr "" msgstr ""
#: actions.py:67 actions.py:138 #: actions.py:71 actions.py:142
msgid "Mark as executed" msgid "Mark as executed"
msgstr "" msgstr ""
#: actions.py:75 models.py:94 #: actions.py:79 models.py:98
msgid "Secured" msgid "Secured"
msgstr "" msgstr ""
#: actions.py:78 #: actions.py:82
msgid "One selected transaction has been marked as secured." msgid "One selected transaction has been marked as secured."
msgstr "" msgstr ""
#: actions.py:79 #: actions.py:83
#, python-format #, python-format
msgid "%s selected transactions have been marked as secured." msgid "%s selected transactions have been marked as secured."
msgstr "" msgstr ""
#: actions.py:83 #: actions.py:87
msgid "Mark as secured" msgid "Mark as secured"
msgstr "" msgstr ""
#: actions.py:91 actions.py:162 models.py:95 #: actions.py:95 actions.py:166 models.py:99
msgid "Rejected" msgid "Rejected"
msgstr "" msgstr ""
#: actions.py:94 actions.py:165 #: actions.py:98 actions.py:169
msgid "One selected transaction has been marked as rejected." msgid "One selected transaction has been marked as rejected."
msgstr "" msgstr ""
#: actions.py:95 actions.py:166 #: actions.py:99 actions.py:170
#, python-format #, python-format
msgid "%s selected transactions have been marked as rejected." msgid "%s selected transactions have been marked as rejected."
msgstr "" msgstr ""
#: actions.py:99 #: actions.py:103
msgid "Mark as rejected" msgid "Mark as rejected"
msgstr "" msgstr ""
#: actions.py:133 #: actions.py:137
msgid "One selected process has been marked as executed." msgid "One selected process has been marked as executed."
msgstr "" msgstr ""
#: actions.py:134 #: actions.py:138
#, python-format #, python-format
msgid "%s selected processes have been marked as executed." msgid "%s selected processes have been marked as executed."
msgstr "" msgstr ""
#: actions.py:146 models.py:162 #: actions.py:150 models.py:165
msgid "Aborted" msgid "Aborted"
msgstr "" msgstr ""
#: actions.py:149 #: actions.py:153
msgid "One selected process has been aborted." msgid "One selected process has been aborted."
msgstr "" msgstr ""
#: actions.py:150 #: actions.py:154
#, python-format #, python-format
msgid "%s selected processes have been aborted." msgid "%s selected processes have been aborted."
msgstr "" msgstr ""
#: actions.py:154 #: actions.py:158
msgid "Abort" msgid "Abort"
msgstr "" msgstr ""
#: actions.py:170 #: actions.py:174
msgid "Commit" msgid "Commit"
msgstr "" msgstr ""
#: admin.py:42 #: admin.py:43
msgid "ID" msgid "ID"
msgstr "" msgstr ""
#: admin.py:101 #: admin.py:105
msgid "proc" msgid "proc"
msgstr "" msgstr ""
#: admin.py:152 #: admin.py:158
msgid "Transactions" msgid "Transactions"
msgstr "" msgstr ""
#: helpers.py:11
msgid "No transaction process selected."
msgstr ""
#: helpers.py:15
msgid "Done nothing. Not all related transactions in waitting execution."
msgstr ""
#: helpers.py:32
msgid "Unprocessed"
msgstr ""
#: helpers.py:34
#, python-format
msgid ""
"One related transaction has been marked as <i>waitting for processing</i>"
msgid_plural ""
"%i related transactions have been marked as <i>waitting for processing</i>."
msgstr[0] ""
msgstr[1] ""
#: methods/creditcard.py:11 #: methods/creditcard.py:11
msgid "Label" msgid "Label"
msgstr "" msgstr ""
@ -165,86 +186,123 @@ msgstr ""
msgid "SEPA Direct Debit" msgid "SEPA Direct Debit"
msgstr "" msgstr ""
#: methods/sepadirectdebit.py:48 #: models.py:20
msgid ""
"This bill will be automatically charged to your bank account with IBAN "
"number<br><strong>%s</strong>."
msgstr ""
"Esta factura se cobrará automaticamente en tu cuenta bancaria con IBAN "
"<br><strong>%s</strong>."
#: models.py:19
msgid "account" msgid "account"
msgstr "" msgstr ""
#: models.py:21 #: models.py:22
msgid "method" msgid "method"
msgstr "" msgstr ""
#: models.py:23 models.py:166 #: models.py:24 models.py:169
msgid "data" msgid "data"
msgstr "" msgstr ""
#: models.py:24 #: models.py:25
msgid "active" msgid "active"
msgstr "" msgstr ""
#: models.py:91 #: models.py:95
msgid "Waitting processing" msgid "Waitting processing"
msgstr "" msgstr ""
#: models.py:92 #: models.py:96
msgid "Waitting execution" msgid "Waitting execution"
msgstr "" msgstr ""
#: models.py:98 #: models.py:102
msgid "bill" msgid "bill"
msgstr "" msgstr ""
#: models.py:101 #: models.py:105
msgid "source" msgid "source"
msgstr "" msgstr ""
#: models.py:103 #: models.py:107
msgid "process" msgid "process"
msgstr "" msgstr ""
#: models.py:104 models.py:168 #: models.py:108 models.py:171
msgid "state" msgid "state"
msgstr "" msgstr ""
#: models.py:106 #: models.py:110
msgid "amount" msgid "amount"
msgstr "" msgstr ""
#: models.py:108 models.py:169 #: models.py:112 models.py:172
msgid "created" msgid "created"
msgstr "" msgstr ""
#: models.py:109 #: models.py:113
msgid "modified" msgid "modified"
msgstr "" msgstr ""
#: models.py:124 #: models.py:128
msgid "New transactions can not be allocated for this bill." msgid "New transactions can not be allocated for this bill."
msgstr "" msgstr ""
#: models.py:160 #: models.py:163 templates/admin/payments/transaction/report.html:63
msgid "Created" msgid "Created"
msgstr "" msgstr ""
#: models.py:163 #: models.py:166
msgid "Commited" msgid "Commited"
msgstr "" msgstr ""
#: models.py:167 #: models.py:170
msgid "file" msgid "file"
msgstr "" msgstr ""
#: models.py:170 #: models.py:173
msgid "updated" msgid "updated"
msgstr "" msgstr ""
#: models.py:173 #: models.py:176
msgid "Transaction processes" msgid "Transaction processes"
msgstr "" msgstr ""
#: settings.py:12
#, fuzzy, python-format
#| msgid ""
#| "This bill will be automatically charged to your bank account with IBAN "
#| "number<br><strong>%s</strong>."
msgid ""
"<strong>Direct debit</strong>, this bill will be automatically charged to "
"your bank account with IBAN number<br><strong>%(number)s</strong>."
msgstr ""
"<strong>Adeudo por domiciliación</strong>, esta factura se cobrará "
"automaticamente en tu cuenta bancaria con IBAN <br><strong>%s</strong>."
#: templates/admin/payments/transaction/report.html:38
msgid "Summary"
msgstr ""
#: templates/admin/payments/transaction/report.html:39
#: templates/admin/payments/transaction/report.html:61
msgid "Amount"
msgstr ""
#: templates/admin/payments/transaction/report.html:48
msgid "TOTAL"
msgstr ""
#: templates/admin/payments/transaction/report.html:57
msgid "Bill"
msgstr ""
#: templates/admin/payments/transaction/report.html:58
msgid "Account"
msgstr ""
#: templates/admin/payments/transaction/report.html:59
msgid "Contact"
msgstr ""
#: templates/admin/payments/transaction/report.html:62
msgid "State"
msgstr ""
#: templates/admin/payments/transaction/report.html:64
msgid "Updated"
msgstr ""

View file

@ -45,8 +45,10 @@ class SEPADirectDebit(PaymentMethod):
due_delta = datetime.timedelta(days=5) due_delta = datetime.timedelta(days=5)
def get_bill_message(self): def get_bill_message(self):
return _("This bill will be automatically charged to your bank account " context = {
" with IBAN number<br><strong>%s</strong>.") % self.instance.number 'number': self.instance.number
}
return settings.PAYMENTS_DD_BILL_MESSAGE % context
@classmethod @classmethod
def process(cls, transactions): def process(cls, transactions):

View file

@ -8,6 +8,11 @@ PAYMENT_CURRENCY = Setting('PAYMENT_CURRENCY',
) )
PAYMENTS_DD_BILL_MESSAGE = Setting('PAYMENTS_DD_BILL_MESSAGE',
_("<strong>Direct debit</strong>, this bill will be automatically charged "
"to your bank account with IBAN number<br><strong>%(number)s</strong>."),
)
PAYMENTS_DD_CREDITOR_NAME = Setting('PAYMENTS_DD_CREDITOR_NAME', PAYMENTS_DD_CREDITOR_NAME = Setting('PAYMENTS_DD_CREDITOR_NAME',
'Orchestra' 'Orchestra'
) )