#38 User requests
* implements 5) "Add 'Maßnahmentyp' for KOMs "
* prepares model and form fields as mixins for easy extension to eco accounts and emas (possibly in the future?)
This commit is contained in:
+31
-1
@@ -189,7 +189,37 @@ class AbstractCompensation(BaseObject):
|
||||
return checker
|
||||
|
||||
|
||||
class Compensation(AbstractCompensation):
|
||||
class CEFMixin(models.Model):
|
||||
""" Provides CEF flag as Mixin
|
||||
|
||||
"""
|
||||
is_cef = models.BooleanField(
|
||||
blank=True,
|
||||
null=True,
|
||||
default=False,
|
||||
help_text="Flag if compensation is a 'CEF-Maßnahme'"
|
||||
)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class CoherenceMixin(models.Model):
|
||||
""" Provides coherence keeping flag as Mixin
|
||||
|
||||
"""
|
||||
is_coherence_keeping = models.BooleanField(
|
||||
blank=True,
|
||||
null=True,
|
||||
default=False,
|
||||
help_text="Flag if compensation is a 'Kohärenzsicherung'"
|
||||
)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin):
|
||||
"""
|
||||
Regular compensation, linked to an intervention
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user