diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-02 14:51:09 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-02 14:59:06 +0100 |
commit | 6dfc238b654c17e2d95a8eff8ac0262498535214 (patch) | |
tree | e7c44902b0dc74675ae3dda5658fc29c14ec71ba /archaeological_operations/models.py | |
parent | 5f12ca50e8273f0215fa0a0a92735ff8c4dd6a84 (diff) | |
download | Ishtar-6dfc238b654c17e2d95a8eff8ac0262498535214.tar.bz2 Ishtar-6dfc238b654c17e2d95a8eff8ac0262498535214.zip |
Manage document template
* ooo_replace: generate a document by mapping ooo variables with
a given dict
* DocumentTemplate model: store templates associated with a type
of objects
* get_values method: generate a dict of value from a model
* new form/view to generate document from administrativ acts
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 3d6eaa15a..e846f15f8 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -31,7 +31,7 @@ from ishtar_common.utils import cached_label_changed from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, LightHistorizedItem, OwnPerms, Department, Source,\ - Person, Organization, Town, Dashboard, IshtarUser + Person, Organization, Town, Dashboard, IshtarUser, ValueGetter FILES_AVAILABLE = 'archaeological_files' in settings.INSTALLED_APPS if FILES_AVAILABLE: from archaeological_files.models import File @@ -347,7 +347,7 @@ class ActType(GeneralType): verbose_name_plural = _(u"Act types") ordering = ('label',) -class AdministrativeAct(BaseHistorizedItem, OwnPerms): +class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): TABLE_COLS = ['act_type', 'associated_file', 'operation', 'associated_file.towns', 'operation.towns'] TABLE_COLS_FILE = ['act_type', 'associated_file', 'associated_file.towns',] @@ -375,6 +375,7 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms): ref_sra = models.CharField(u"Référence SRA", max_length=15, blank=True, null=True) history = HistoricalRecords() + _prefix = 'adminact_' class Meta: verbose_name = _(u"Administrative act") |