Enable smart links from the documents types side

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-29 01:08:52 -04:00
parent aee3645c7a
commit cfe623e093
8 changed files with 93 additions and 21 deletions

View File

@@ -36,7 +36,8 @@ class SmartLink(models.Model):
)
enabled = models.BooleanField(default=True, verbose_name=_('Enabled'))
document_types = models.ManyToManyField(
to=DocumentType, verbose_name=_('Document types')
related_name='smart_links', to=DocumentType,
verbose_name=_('Document types')
)
objects = SmartLinkManager()
@@ -212,4 +213,3 @@ class SmartLinkCondition(models.Model):
)
get_full_label.short_description = _('Full label')