From ee1551b414158380c32b3e0410ba936eb1346812 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 30 Apr 2018 15:21:25 +0200 Subject: Relation graph: add logical fields in relations --- ishtar_common/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index ccbe486e0..cbf1431a7 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1404,6 +1404,13 @@ class BaseHistorizedItem(FullSearch, Imported, JsonData, FixAssociated): return True +LOGICAL_TYPES = ( + ('above', _(u"Above")), + ('bellow', _(u"Bellow")), + ('equal', _(u"Equal")) +) + + class GeneralRelationType(GeneralType): order = models.IntegerField(_(u"Order"), default=1) symmetrical = models.BooleanField(_(u"Symmetrical")) @@ -1412,6 +1419,9 @@ class GeneralRelationType(GeneralType): inverse_relation = models.ForeignKey( 'self', verbose_name=_(u"Inverse relation"), blank=True, null=True) + logical_relation = models.CharField( + verbose_name=_(u"Logical relation"), max_length=10, + choices=LOGICAL_TYPES, blank=True, null=True) class Meta: abstract = True -- cgit v1.2.3