mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-26 01:12:43 -05:00
Feature: consumption templates (#4196)
* Initial implementation of consumption templates * Frontend implementation of consumption templates Testing * Support consumption template source * order templates, automatically add permissions * Support title assignment in consumption templates * Refactoring, filters to and, show sources on list Show sources on template list, update some translation strings Make filters and minor testing * Update strings * Only update django-multiselectfield * Basic docs, document some methods * Improve testing coverage, template multi-assignment merges
This commit is contained in:
@@ -82,6 +82,7 @@ class MailRule(document_models.ModelWithOwner):
|
||||
class TitleSource(models.IntegerChoices):
|
||||
FROM_SUBJECT = 1, _("Use subject as title")
|
||||
FROM_FILENAME = 2, _("Use attachment filename as title")
|
||||
NONE = 3, _("Do not assign title from rule")
|
||||
|
||||
class CorrespondentSource(models.IntegerChoices):
|
||||
FROM_NOTHING = 1, _("Do not assign a correspondent")
|
||||
@@ -225,6 +226,11 @@ class MailRule(document_models.ModelWithOwner):
|
||||
verbose_name=_("assign this correspondent"),
|
||||
)
|
||||
|
||||
assign_owner_from_rule = models.BooleanField(
|
||||
_("Assign the rule owner to documents"),
|
||||
default=True,
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.account.name}.{self.name}"
|
||||
|
||||
|
Reference in New Issue
Block a user