diff options
-rw-r--r-- | ishtar/furnitures/forms.py | 6 | ||||
-rw-r--r-- | ishtar/furnitures/models.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py index 3736029d5..64acaa5c5 100644 --- a/ishtar/furnitures/forms.py +++ b/ishtar/furnitures/forms.py @@ -455,8 +455,12 @@ class FileFormGeneralRO(FileFormGeneral): class FileFormAddress(forms.Form): form_label = _("Address") + associated_models = {'town':models.Town} total_surface = forms.IntegerField(label=_("Total surface")) - address = forms.CharField(label=_(u"Address"), widget=forms.Textarea) + address = forms.CharField(label=_(u"Main address"), widget=forms.Textarea) + address_complement = forms.CharField(label=_(u"Main address - complement")) + postal_code = forms.CharField(label=_(u"Main address - postal code"), + max_length=10) class TownForm(forms.Form): form_label = _("Towns") diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py index 5a8a76fba..6664adb72 100644 --- a/ishtar/furnitures/models.py +++ b/ishtar/furnitures/models.py @@ -245,7 +245,11 @@ class File(BaseHistorizedItem, OwnPerms): total_surface = models.IntegerField(_(u"Total surface")) total_developed_surface = models.IntegerField(_(u"Total developed surface"), blank=True, null=True) - address = models.TextField(_(u"Address")) + address = models.TextField(_(u"Main address"), null=True, blank=True) + address_complement = models.TextField(_(u"Main address - complement"), + null=True, blank=True) + postal_code = models.CharField(_(u"Main address - postal code"), + max_length=10, null=True, blank=True) comment = models.TextField(_(u"Comment")) history = HistoricalRecords() |