summaryrefslogtreecommitdiff
path: root/ishtar/furnitures
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2011-05-11 01:42:48 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2011-05-11 01:42:48 +0200
commit1d1844ec02a698494ba943bde8d5f04571f08b4f (patch)
tree5bef0b9ef8aabcb0162b343b6b94f7d7e5e4e46d /ishtar/furnitures
parent628a88933fa5ac933cc6497240b36d21b40c34a5 (diff)
downloadIshtar-1d1844ec02a698494ba943bde8d5f04571f08b4f.tar.bz2
Ishtar-1d1844ec02a698494ba943bde8d5f04571f08b4f.zip
Labels corrections - minors
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])