From d8f7042b07a87ef16d59bee196c6ab8d8306a4c3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 14 Feb 2025 16:11:33 +0100 Subject: ✨ templates: add precise_town_name to person and organization (refs #6167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models_common.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index 7b84b4dbd..6f995569c 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -3779,6 +3779,14 @@ class Address(BaseHistorizedItem): return "" return self.precise_town.name + def get_values(self, prefix="", no_values=False, filtr=None, **kwargs): + values = super().get_values( + prefix=prefix, no_values=no_values, filtr=filtr, + **kwargs + ) + values[f"{prefix}precise_town_name"] = self.precise_town_name + return values + @post_importer_action def set_town_by_code(self, context, value): try: -- cgit v1.2.3