summaryrefslogtreecommitdiff
path: root/ishtar/furnitures/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar/furnitures/models.py')
-rw-r--r--ishtar/furnitures/models.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py
index f770fc6c6..d3b942102 100644
--- a/ishtar/furnitures/models.py
+++ b/ishtar/furnitures/models.py
@@ -85,13 +85,17 @@ class Departement(models.Model):
return unicode(self.number) + u" - " + self.label
class Address(BaseHistorizedItem):
- address = models.TextField(_(u"Address"))
- address_complement = models.TextField(_(u"Address complement"))
- postal_code = models.CharField(_(u"Postal code"), max_length=10)
- town = models.CharField(_(u"Town"), max_length=30)
- country = models.CharField(_(u"Country"), max_length=30)
- phone = models.CharField(_(u"Phone"), max_length=18)
- mobile_phone = models.CharField(_(u"Mobile phone"), max_length=18)
+ address = models.TextField(_(u"Address"), null=True, blank=True)
+ address_complement = models.TextField(_(u"Address complement"), null=True,
+ blank=True)
+ postal_code = models.CharField(_(u"Postal code"), max_length=10, null=True,
+ blank=True)
+ town = models.CharField(_(u"Town"), max_length=30, null=True, blank=True)
+ country = models.CharField(_(u"Country"), max_length=30, null=True,
+ blank=True)
+ phone = models.CharField(_(u"Phone"), max_length=18, null=True, blank=True)
+ mobile_phone = models.CharField(_(u"Mobile phone"), max_length=18,
+ null=True, blank=True)
history = HistoricalRecords()
class Meta:
@@ -134,7 +138,7 @@ class Person(Address, OwnPerms) :
email = models.CharField(_(u"Email"), max_length=40)
person_type = models.ForeignKey(PersonType, verbose_name=_(u"Type"))
attached_to = models.ForeignKey('Organization',
- verbose_name=_(u"Is attached to"))
+ verbose_name=_(u"Is attached to"), blank=True, null=True)
is_author = models.NullBooleanField(_(u"Is an author?"), blank=True,
null=True)
in_charge_storage = models.NullBooleanField(_(u"In charge of a storage?"),
@@ -144,6 +148,7 @@ class Person(Address, OwnPerms) :
verbose_name = _(u"Person")
verbose_name_plural = _(u"Persons")
permissions = (
+ ("view_person", ugettext(u"Can view Person")),
("view_own_person", ugettext(u"Can view own Person")),
("add_own_person", ugettext(u"Can add own Person")),
("change_own_person", ugettext(u"Can change own Person")),