summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
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
commit6326867adb72dd9ded160769ef09e77b2e482784 (patch)
treee7c44902b0dc74675ae3dda5658fc29c14ec71ba /archaeological_operations/models.py
parentde9fbce423f780a02b73a9e943995b0b7efb0008 (diff)
downloadIshtar-6326867adb72dd9ded160769ef09e77b2e482784.tar.bz2
Ishtar-6326867adb72dd9ded160769ef09e77b2e482784.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.py5
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")