From 85108e2ecf8fd38453e5ac0cb7a25d1c169cdb3b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 28 Nov 2024 17:09:34 +0100 Subject: ✨ site profile: ability to set default localisation for treatments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 2f103ab06..dc3c5d29a 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1166,7 +1166,19 @@ class IshtarSiteProfile(models.Model, Cached): no_context_button = models.ForeignKey( "archaeological_context_records.ContextRecord", verbose_name=_("Context record for no context button"), - help_text=_('If provided a button is displayed on find add page to create a "No context" find'), + help_text=_('If provided, a button is displayed on find add page to ' + 'create a "No context" find'), + on_delete=models.SET_NULL, + null=True, + blank=True + ) + default_location_for_treatment = models.ForeignKey( + "archaeological_warehouse.Warehouse", + verbose_name=_("Default location for treatments"), + help_text=_("If provided, treatment forms have by default this " + "location set. Furthermore if this location has " + "an organization attached, this organization is set " + "by default."), on_delete=models.SET_NULL, null=True, blank=True -- cgit v1.2.3