diff options
| -rw-r--r-- | archaeological_operations/models.py | 4 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 2 | 
2 files changed, 5 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index ebe9ae551..57338f81c 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -421,6 +421,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,      def show_url(self):          return reverse('show-operation', args=[self.pk, '']) +    def towns_codes(self): +        return [u"{} ({})".format(town.name, town.numero_insee) for town in +                self.towns.all()] +      def has_finds(self):          from archaeological_finds.models import BaseFind          return BaseFind.objects.filter(context_record__operation=self).count() diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index f35954488..69e6c3ddf 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -72,7 +72,7 @@  {% if item.towns.count %}  <h3>{% trans "Localisation"%}</h3>  <ul class='form-flex'> -{% field_li_multiple "Towns" item.towns %} +{% field_li "Towns" item.towns_codes|join:" ; "  %}  {% field_li "Main address" item.associated_file.address %}  {% field_li "Complement" item.associated_file.address_complement %}  {% field_li "Postal code" item.associated_file.postal_code %}  | 
