diff options
| author | Paramjit Singh Sahota <psa@tinyerp.com> | 2013-12-24 11:01:25 +0530 |
|---|---|---|
| committer | Paramjit Singh Sahota <psa@tinyerp.com> | 2013-12-24 11:01:25 +0530 |
| commit | 18d8368ee11eef0a74bacdb8f293414331bfa8da (patch) | |
| tree | fc21df70cbd2901396c2bcf2fee0b52d750abd43 /addons/document | |
| parent | 5900672160c2bd5ae1d9257f20dbb5c51a193996 (diff) | |
| parent | 123185757f51ee7e146d7295864556999d2a6938 (diff) | |
[MERGE] Merged lp:~openerp-dev/openobject-addons/trunk-website-al
bzr revid: psa@tinyerp.com-20131224053125-3lrogsrgd3ccp0i6
Diffstat (limited to 'addons/document')
| -rw-r--r-- | addons/document/document.py | 4 | ||||
| -rw-r--r-- | addons/document/security/ir.model.access.csv | 1 | ||||
| -rw-r--r-- | addons/document/static/src/js/document.js | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/addons/document/document.py b/addons/document/document.py index 91af97246b8..5fc62578b1d 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -69,7 +69,11 @@ class document_file(osv.osv): def check(self, cr, uid, ids, mode, context=None, values=None): """Overwrite check to verify access on directory to validate specifications of doc/access_permissions.rst""" + if not isinstance(ids, list): + ids = [ids] + super(document_file, self).check(cr, uid, ids, mode, context=context, values=values) + if ids: self.pool.get('ir.model.access').check(cr, uid, 'document.directory', mode) diff --git a/addons/document/security/ir.model.access.csv b/addons/document/security/ir.model.access.csv index e0513a0640c..8c5e4323831 100644 --- a/addons/document/security/ir.model.access.csv +++ b/addons/document/security/ir.model.access.csv @@ -15,3 +15,4 @@ access_report_document_user_group_document_manager,report.document.user document access_report_document_file_group_document_manager,report.document.file document manager,model_report_document_file,base.group_system,1,0,0,0
access_report_document_file_group_document,report.document.file document manager,model_report_document_file,base.group_document_user,1,0,0,0
access_report_document_user_knowledgeuser,report.document.user knowledgeuser,document.model_report_document_user,base.group_document_user,1,0,0,0
+access_document_storage,access_document_storage,model_document_storage,base.group_system,1,1,1,1
diff --git a/addons/document/static/src/js/document.js b/addons/document/static/src/js/document.js index 23f1375e8c8..e4bce2da76e 100644 --- a/addons/document/static/src/js/document.js +++ b/addons/document/static/src/js/document.js @@ -9,7 +9,7 @@ openerp.document = function (instance) { on_attachments_loaded: function(attachments) { //to display number in name if more then one attachment which has same name. var self = this; - _.chain(attachments.reverse()) + _.chain(attachments) .groupBy(function(attachment) { return attachment.name}) .each(function(attachment){ if(attachment.length > 1) |
