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
commitc02ea8056cde5f2c86af4787cadd64498c5ebf0b (patch)
tree79245aa6e7000c98c270b3d7110b7a3794638ea8 /archaeological_files/models.py
parentb564db3bb2dbbb71c0d1c1eb7f40ef44fa50e811 (diff)
downloadIshtar-c02ea8056cde5f2c86af4787cadd64498c5ebf0b.tar.bz2
Ishtar-c02ea8056cde5f2c86af4787cadd64498c5ebf0b.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
)