summaryrefslogtreecommitdiff
path: root/ishtar/furnitures
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar/furnitures')
-rw-r--r--ishtar/furnitures/forms.py4
-rw-r--r--ishtar/furnitures/models.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py
index 54d1d6af7..e9a9159eb 100644
--- a/ishtar/furnitures/forms.py
+++ b/ishtar/furnitures/forms.py
@@ -1458,7 +1458,7 @@ class OperationWizard(FileWizard):
try:
for parcel in models.File.objects.get(pk=int(file_id)
).parcels.all():
- parcels.append((parcel.pk, unicode(parcel)))
+ parcels.append((parcel.pk, parcel.short_label()))
except (ValueError, ObjectDoesNotExist):
pass
data['PARCELS'] = sorted(parcels, key=lambda x:x[1])
@@ -1779,7 +1779,7 @@ operation_modification_wizard = OperationWizard([
'towns-operation_modification':has_associated_file(
'general-operation_modification'),
'parcelsgeneral-operation_modification':has_associated_file(
- 'general-operation_creation', negate=True),
+ 'general-operation_modification', negate=True),
'parcels-operation_modification':has_associated_file(
'general-operation_modification'),
},
diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py
index 17f18a79d..9bbb8bf2d 100644
--- a/ishtar/furnitures/models.py
+++ b/ishtar/furnitures/models.py
@@ -621,6 +621,9 @@ class Parcel(LightHistorizedItem):
self.parcel_number] if item])
def __unicode__(self):
+ return self.short_label()
+
+ def long_label(self):
return JOINT.join([unicode(item) for item in \
[self.associated_file, self.operation, self.section, self.parcel_number]
if item])