Roberto Rosario
74ec939779
Fix optional metadata remove
...
Soleve issue of removing an optional document metadata
from a document that also contained existing required metadata.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2019-05-11 18:14:01 -04:00
Roberto Rosario
fda0dd4eaf
Add transaction handling in more places
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2019-04-29 14:05:02 -04:00
Roberto Rosario
b6976210a5
Add docstrings for almost all models
...
Also adds docstring to some managers and model methods.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2019-04-15 15:19:38 -04:00
Roberto Rosario
36a51eeb73
Switch to full app paths
...
Instead of inserting the path of the apps into the Python app,
the apps are now referenced by their full import path.
This solves name clashes with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.
Every app reference is now prepended with 'mayan.apps'.
Existing config.yml files need to be updated manually.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2019-04-05 02:02:57 -04:00
Roberto Rosario
c6354beb92
Add separate Python 2 and Python 3 versions of the MetadataType model .comma_splitter() static method.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-10-06 22:32:29 -04:00
Roberto Rosario
a372fc5a07
Improve model help texts. Add respective migrations.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-09-17 02:46:16 -04:00
Roberto Rosario
c6d3ffa28b
Update Django template reference URL from Django 1.7 to Django 1.11. Add migratons to update model definitions.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-23 19:55:30 -04:00
Roberto Rosario
8e39016f12
Code cleanups.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-21 18:57:38 -04:00
Roberto Rosario
0022548e35
Add support for document metadata events: add, edit and remove.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-15 05:04:09 -04:00
Roberto Rosario
4e762d7522
Add new metadata app events: metadata type created, metadata type edited, metadata type to document type relationship update. Add link to metadata type events. Add support for subscribing to metadata type events.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-15 03:23:30 -04:00
Roberto Rosario
e18c043c1f
Improve natural key handing for the Document, Metadata, DocumentMetadata, DocumentTypeOCRSetting and UserProfileLocale models.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-02 16:00:22 -04:00
Roberto Rosario
c665e75871
Improve serialization migration for the models: Document, DocumentVersion, DocumentMetadata and DocumentTypeOCRSettings
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-01 05:09:43 -04:00
Michael Price
53239385ae
Add the "to=" keyword argument to all ForeignKey, ManayToMany and OneToOne Fields.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:49:04 -04:00
Michael Price
de65d96fe2
Update cabinets and document_index api views docstrings. Update multi level docstrings as per Python best practices.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:27:45 -04:00
Michael Price
28aa0b913c
Reorganize and sort models and managers according to Mayan's best practices.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:21:37 -04:00
Michael Price
61cb9ac524
Silence UnorderedObjectListWarning warnings.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:01:27 -04:00
Roberto Rosario
8b9e605e0b
When changing document types, don't delete the old metadata that is
...
also found in the new document type. GitLab issue #421 .
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-24 19:44:08 -04:00
Roberto Rosario
f09321f6ab
Fix deprecation warnings for Django 1.11 and Django 2.0.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-21 00:25:18 -04:00
Roberto Rosario
6c6ca38374
Replace all instances of unicode only handling to use force_text.
...
Replace all __unicode__ methods to __str__ and the
@python_2_unicode_compatible decorator.
Replace all instance of smart_str, smart_unicode, force_uncode
with force_text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-05 15:03:24 -04:00
Roberto Rosario
b58fa7e241
Return metadata type lookup values as list of unicode not list of strings.
...
Fixed GitLab issue #310 , thank for @fordguo for the find and fix suggestion.
2017-02-03 16:20:45 -04:00
Roberto Rosario
516920f833
Be more explicit about which requied metadata type is missing.
2016-05-12 01:33:10 -04:00
Roberto Rosario
59624d75cb
Fix GitLab issue #250 "Empty optional lookup metadata trigger validation error". Thanks to LeVon Smoker for the find and for the proposed fix.
...
Reference: https://groups.google.com/forum/#!topic/mayan-edms/VUGRl4xX-1c
2016-02-09 13:00:45 -04:00
Roberto Rosario
79c5a103a2
Fix GitLab issue #243 , "System allows a user to skip entering values for a required metadata field while uploading a new document".
2016-01-12 02:40:47 -04:00
Roberto Rosario
e57080b06d
Style updates.
2015-10-19 01:21:43 -04:00
Roberto Rosario
7392e80fc2
PEP8 Cleanups.
2015-08-24 20:55:45 -04:00
Roberto Rosario
1d7f447dad
Raise validation error without specifying the field as this code can be called for a collection of instances.
2015-08-23 22:44:47 -04:00
Roberto Rosario
9599a3f8ab
Split metadata validators in validators and parsers. Move document and upload wizard metadata validation logic to model. Add metadata tests.
2015-08-20 04:37:49 -04:00
Roberto Rosario
60bc327756
Improve SourceColumn workflow by allowing explicit functions as columns. Remove usage of encapsulate. Move instances of 'extra_columns' to SourceColumn.
2015-08-16 14:26:41 -04:00
Roberto Rosario
7cae9dd18e
Update the smart link app to use Django templating language. gh-issues #151 .
2015-07-28 02:44:33 -04:00
Roberto Rosario
0a0a92116e
Get rid of eval in metadata type default and lookup fields. gh-issue #151 .
2015-07-23 02:49:29 -04:00
Roberto Rosario
58d919d173
Initial commit to remove use of eval. gh-issue #151 .
2015-07-22 23:19:43 -04:00
Roberto Rosario
e891fe9525
PEP8 cleanups and code style cleanups.
2015-07-10 17:19:36 -04:00
Roberto Rosario
f4bcab2341
Rename metadata type title field to label.
2015-07-07 23:25:05 -04:00
Roberto Rosario
0e81ea2ab8
Avoid triggering migration creation using functions for choices and validators choices.
2015-07-07 21:21:08 -04:00
Roberto Rosario
78198f3398
Smart settings refactor
2015-06-22 21:04:06 -04:00
Roberto Rosario
26d64c45f5
Add the @python_2_unicode_compatible to all models. Closes issue #67
2015-04-01 02:40:19 -04:00
Roberto Rosario
d59ea3ede2
Add from __future__ import unicode_literals, issue #37
2015-01-19 04:06:40 -04:00
Roberto Rosario
f5e1adedfa
Add field to set validation function separately from the lookup field
2015-01-14 15:50:41 -04:00
Roberto Rosario
35821df7ee
Add TODO reminder
2015-01-03 12:17:36 -04:00
Roberto Rosario
82bedefff6
Add unicode method, update and optimize validation code
2014-12-08 19:34:40 -04:00
Roberto Rosario
704abb7059
Use related_name 'metadata' to access document types' metadata types
2014-12-08 18:37:54 -04:00
Roberto Rosario
5050c7319c
Remove preemptive document metadata selection
2014-12-08 18:33:57 -04:00
Roberto Rosario
4aa84b778c
Only allow one instance of a metadata type per document
2014-12-02 00:43:56 -04:00
Roberto Rosario
8194e898a0
Make the title field of the MetatadaType model a required field
2014-11-11 04:23:31 -04:00
Roberto Rosario
8a54e2bde4
Add flag to allow signals to bypass metadata validation
2014-11-03 00:09:58 -04:00
Roberto Rosario
5ca3684712
Reduce number of queries for document metadata retrieval
2014-11-02 23:41:12 -04:00
Roberto Rosario
d92bd67331
Add validation to block removal of required metadata types from a document
2014-10-30 03:20:37 -04:00
Roberto Rosario
95a27df1e3
Change the way metadata types are associated to a document type, add required boolean field to the association
2014-10-30 02:24:12 -04:00
Roberto Rosario
6eb6c43807
Automatically the appropiate metadata types when the document's type is changed
2014-10-28 02:01:59 -04:00
Roberto Rosario
21d51accec
Make sure the metadata being added is allowed
2014-10-27 23:21:13 -04:00