Migration updates

Squash version page migrations.
Add manual OCR and parsing migrations.
Fix tests.
Page search updates.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-10-09 16:38:00 -04:00
parent d0ee8aba16
commit 7fbb94a8ae
36 changed files with 449 additions and 269 deletions

View File

@@ -127,6 +127,7 @@ class DocumentsApp(MayanAppConfig):
DocumentType = self.get_model(model_name='DocumentType')
DocumentTypeFilename = self.get_model(model_name='DocumentTypeFilename')
DocumentVersion = self.get_model(model_name='DocumentVersion')
DocumentVersionPage = self.get_model(model_name='DocumentVersionPage')
DuplicatedDocument = self.get_model(model_name='DuplicatedDocument')
DynamicSerializerField.add_serializer(
@@ -228,7 +229,7 @@ class DocumentsApp(MayanAppConfig):
model=Document, manager_name='passthrough'
)
ModelPermission.register_inheritance(
model=DocumentPage, related='document_version__document',
model=DocumentPage, related='document',
)
ModelPermission.register_manager(
model=DocumentPage, manager_name='passthrough'
@@ -245,6 +246,9 @@ class DocumentsApp(MayanAppConfig):
ModelPermission.register_inheritance(
model=DocumentVersion, related='document',
)
ModelPermission.register_inheritance(
model=DocumentVersionPage, related='document_version',
)
# Document and document page thumbnail widget
document_page_thumbnail_widget = DocumentPageThumbnailWidget()