summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorron@tinyerp.com <>2010-10-12 11:56:08 +0530
committerron@tinyerp.com <>2010-10-12 11:56:08 +0530
commite848ed0cf4133f3c0827e81d13527dd1dbfa07e6 (patch)
tree1aa15fffe53949006e5a8602308ea38388b24277 /addons/document/document.py
parent635e3389e9fcba904ede1ae7d57fec1f6b587608 (diff)
[IMP] ::Documents->Shared Repository:enlarge the FTP server field,Documents-> descending by date and tooltip change and fix bug on my document filter button::Reporting->Document Dashboard->group by year/Month and default user_id context remove
bzr revid: ron@tinyerp.com-20101012062608-nvlyu9qag6zeyh5h
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 624af24c1fb..f4b752fb636 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -41,7 +41,7 @@ class document_file(osv.osv):
fbrl = self.browse(cr, uid, ids, context=context)
nctx = nodes.get_node_context(cr, uid, context={})
# nctx will /not/ inherit the caller's context. Most of
- # it would be useless, anyway (like active_id, active_model,
+ # it would be useless, anyway (like active_id, active_model,
# bin_size etc.)
result = {}
bin_size = context.get('bin_size', False)
@@ -91,10 +91,11 @@ class document_file(osv.osv):
'company_id': fields.many2one('res.company', 'Company'),
'file_size': fields.integer('File Size', required=True),
'file_type': fields.char('Content Type', size=128),
-
+
# fields used for file storage
'store_fname': fields.char('Stored Filename', size=200),
}
+ _order = "create_date desc"
def __get_def_directory(self, cr, uid, context=None):
dirobj = self.pool.get('document.directory')
@@ -150,7 +151,7 @@ class document_file(osv.osv):
return False
if not self._check_duplication(cr, uid, vals, ids, 'write'):
raise osv.except_osv(_('ValidateError'), _('File name must be unique!'))
-
+
# if nodes call this write(), they must skip the code below
from_node = context and context.get('__from_node', False)
if (('parent_id' in vals) or ('name' in vals)) and not from_node: