diff options
| -rw-r--r-- | ishtar/furnitures/models.py | 18 | 
1 files changed, 14 insertions, 4 deletions
| diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py index b6ee0bcd0..278a516bd 100644 --- a/ishtar/furnitures/models.py +++ b/ishtar/furnitures/models.py @@ -35,8 +35,9 @@ class GeneralType(models.Model):      """      Abstract class for "types"      """ -    label = models.CharField(_(u"Label"), max_length=30) +    label = models.CharField(_(u"Label"), max_length=100)      comment = models.TextField(_(u"Comment")) +    available = models.BooleanField(_(u"Available"))      class Meta:          abstract = True @@ -73,8 +74,10 @@ class OrganizationType(GeneralType):          verbose_name_plural = _(u"Organization types")  class Organization(models.Model): -    name = models.CharField(_(u"Name"), max_length=60) -    person_type = models.ForeignKey(OrganizationType, verbose_name=_(u"Type")) +    name = models.CharField(_(u"Name"), max_length=100) +    organization_type = models.ForeignKey(OrganizationType, +                                          verbose_name=_(u"Type")) +    history = HistoricalRecords()      class Meta:          verbose_name = _(u"Organization")          verbose_name_plural = _(u"Organizations") @@ -90,7 +93,7 @@ class Person(Address) :              ('Md', _(u'Mrs')),              ('Dr', _(u'Doctor')),              ) -    title = models.CharField(_(u"Title"), max_length=1, choices=TYPE) +    title = models.CharField(_(u"Title"), max_length=2, choices=TYPE)      surname = models.CharField(_(u"Surname"), max_length=20)      name = models.CharField(_(u"Name"), max_length=30)      email = models.CharField(_(u"Email"), max_length=40) @@ -99,6 +102,7 @@ class Person(Address) :                                      verbose_name=_(u"Is attached to"))      is_author = models.BooleanField(_(u"Is an author?"))      in_charge_storage = models.BooleanField(_(u"In charge of a storage?")) +    history = HistoricalRecords()      class Meta:          verbose_name = _(u"Person") @@ -165,6 +169,7 @@ class Operation(models.Model):      operation_type = models.ForeignKey(OperationType, related_name='+',                                         verbose_name=_(u"Operation type"))      towns = models.ManyToManyField("Town") +    history = HistoricalRecords()      if settings.COUNTRY == 'fr':          code_patriarche = models.IntegerField(u"Code PATRIARCHE")          code_pat = models.CharField(u"Code PAT", max_length=10) @@ -239,6 +244,7 @@ class RegistrationUnit(models.Model):      interpretation = models.TextField(_(u"Interpretation"))      filling = models.TextField(_(u"Filling"))      datings = models.ManyToManyField(Dating) # dans Item ??? +    history = HistoricalRecords()      class Meta:          verbose_name = _(u"Registration Unit") @@ -277,6 +283,7 @@ class BaseItem(models.Model):                              verbose_name=_(u"Registration Unit"))      is_isolated = models.BooleanField(_(u"Is isolated?"))      documentations = models.ManyToManyField(Source) +    history = HistoricalRecords()      class Meta:          verbose_name = _(u"Base item") @@ -300,6 +307,7 @@ class Item(models.Model):      downstream_treatment = models.ForeignKey("Treatment",        related_name='upstream_treatment', verbose_name=_("Downstream treatment"))      dating = models.ForeignKey(Dating, verbose_name=_(u"Dating")) +    history = HistoricalRecords()      class Meta:          verbose_name = _(u"Item") @@ -355,6 +363,7 @@ class AdministrativeAct(models.Model):      person = models.ForeignKey(Person, verbose_name=_(u"Person"))      if settings.COUNTRY == 'fr':          ref_sra = models.CharField(u"Référence SRA", max_length=15) +    history = HistoricalRecords()      class Meta:          verbose_name = _(u"Administrative act") @@ -429,6 +438,7 @@ class Treatment(models.Model):      person = models.ForeignKey(Person, verbose_name=_(u'Person'))      start_date = models.DateField(_(u"Start date"))      end_date = models.DateField(_(u"End date")) +    history = HistoricalRecords()      class Meta:          verbose_name = _(u"Treatment") | 
