source: treasury/vouchers/models.py @ 6a867b3

client
Last change on this file since 6a867b3 was 6a867b3, checked in by Alex Dehnert <adehnert@…>, 16 years ago

Revert "Use auto_add_now for request time on RR"

It isn't clear that it actually works
(http://www.b-list.org/weblog/2006/nov/02/django-tips-auto-populated-fields/#c2407)
and it keeps me from seeing that field.

This reverts commit 68bd11969e009da514cda052a90b2f81945af97c.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1from django.db import models
2import settings
3from finance_core.models import BudgetArea, BudgetTerm
4
5import datetime
6
7
8class ReimbursementRequest(models.Model):
9    submitter = models.CharField(max_length=10) # MIT username of submitter
10    check_to_name = models.CharField(max_length=50, verbose_name="check recipient's name")
11    check_to_email = models.EmailField(verbose_name="email address for check pickup")
12    check_to_addr = models.TextField(blank=True, verbose_name="address for check mailing", help_text="For most requests, this should be blank for pickup in SAO (W20-549)")
13    amount = models.DecimalField(max_digits=7, decimal_places=2)
14    budget_area = models.ForeignKey(BudgetArea)
15    budget_term = models.ForeignKey(BudgetTerm)
16    request_time = models.DateTimeField(default=datetime.datetime.now)
17    approval_time = models.DateTimeField(blank=True)
18    printing_time = models.DateTimeField(blank=True)
19    name = models.CharField(max_length=50,)
20    description = models.TextField(blank=True)
21
22    def __unicode__(self, ):
23        return "%s: %s (%s) (by %s) for $%s in %s during %s" % (
24            self.name,
25            self.check_to_name,
26            self.check_to_email,
27            self.submitter,
28            self.amount,
29            self.budget_area.name,
30            self.budget_term.name,
31        )
Note: See TracBrowser for help on using the repository browser.