summaryrefslogtreecommitdiff
path: root/archaeological_files/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-05 16:55:49 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:59:31 +0200
commitb9c259a2cadd9717cb6854ac4931a87d6becc938 (patch)
tree79245aa6e7000c98c270b3d7110b7a3794638ea8 /archaeological_files/models.py
parent99267eeeb104293842333c086cf23d8ce37a4795 (diff)
downloadIshtar-b9c259a2cadd9717cb6854ac4931a87d6becc938.tar.bz2
Ishtar-b9c259a2cadd9717cb6854ac4931a87d6becc938.zip
Preventive file - admin: copy job and costs from price agreement
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r--archaeological_files/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py
index 8d3f014da..60f9882fe 100644
--- a/archaeological_files/models.py
+++ b/archaeological_files/models.py
@@ -80,6 +80,8 @@ class PriceAgreement(GeneralType):
verbose_name_plural = _("Price agreement")
ordering = (
"order",
+ "start_date",
+ "end_date",
"label",
)
@@ -669,6 +671,10 @@ class File(
# <-- research archaeology
# --> preventive detail
+ price_agreement = models.ForeignKey(
+ PriceAgreement, verbose_name=_("Price agreement"), blank=True, null=True,
+ on_delete=models.SET_NULL
+ )
study_period = models.CharField(
_("Study period"), max_length=200, default="", blank=True
)