From c02ea8056cde5f2c86af4787cadd64498c5ebf0b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 5 Jul 2022 16:55:49 +0200 Subject: Preventive file - admin: copy job and costs from price agreement --- archaeological_files/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'archaeological_files/models.py') 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 ) -- cgit v1.2.3