feat(pilote_extended): affichage du num. tel. custom dans le chapeau

cf #18
main
Vincent Adolphe 2022-07-08 18:08:29 +02:00
Parent 95aaa9e885
révision a6aaba335c
2 fichiers modifiés avec 6 ajouts et 1 suppressions

Voir le fichier

@ -13,6 +13,8 @@ from django.db.models import (
from creme.creme_core import models as creme_models
from creme.persons.models import AbstractOrganisation
from .fields import phone_repr
class Organisation(AbstractOrganisation):
class Meta(AbstractOrganisation.Meta):
@ -184,3 +186,6 @@ class Organisation(AbstractOrganisation):
null=True,
blank=True,
).set_tags(optional=True)
def get_phone_display(self):
return phone_repr(self.phone)

Voir le fichier

@ -77,7 +77,7 @@
<div class="card-info-field">
<span class='card-info-key'>{% trans 'Phone' %}</span>
<span class='card-info-value'>
{{object.phone|default:'—'}}
{{object.get_phone_display|default:'—'}}
{% brick_card_action_for_field instance=object field='phone' user=user %}
</span>
</div>