diff --git a/VERSION b/VERSION index 09573dde74..eea5773ebc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -nursix-dev-5584-g21b196ba5 (2023-02-10 14:28:10) +nursix-dev-5585-g503b674b1 (2023-02-10 14:44:14) diff --git a/modules/s3db/doc.py b/modules/s3db/doc.py index 2b4b4b701b..fea3226043 100644 --- a/modules/s3db/doc.py +++ b/modules/s3db/doc.py @@ -183,6 +183,7 @@ def model(self): writable = False, ), s3_date(label = T("Date Published"), + default = "now", ), # @ToDo: Move location to link table location_id(# Enable when-required diff --git a/modules/templates/RLPPTM/customise/doc.py b/modules/templates/RLPPTM/customise/doc.py index d0547a7dfc..48cd4db1c0 100644 --- a/modules/templates/RLPPTM/customise/doc.py +++ b/modules/templates/RLPPTM/customise/doc.py @@ -11,24 +11,23 @@ def doc_document_resource(r, tablename): T = current.T - if r.controller == "org" or r.function == "organisation": + s3db = current.s3db + table = s3db.doc_document - s3db = current.s3db - table = s3db.doc_document + # Custom label for date-field, default not writable + field = table.date + field.label = T("Uploaded on") + field.writable = False - # Hide URL field - field = table.url - field.readable = field.writable = False + # Hide URL field + field = table.url + field.readable = field.writable = False - # Custom label for date-field - field = table.date - field.label = T("Uploaded on") - field.default = r.utcnow.date() - field.writable = False + # Custom label for name-field + field = table.name + field.label = T("Title") - # Custom label for name-field - field = table.name - field.label = T("Title") + if r.controller == "org" or r.function == "organisation": # List fields list_fields = ["name",