diff options
| author | Harry (Open ERP) <hmo@tinyerp.com> | 2010-04-20 11:21:17 +0530 |
|---|---|---|
| committer | Harry (Open ERP) <hmo@tinyerp.com> | 2010-04-20 11:21:17 +0530 |
| commit | d8994f04d0dbd64f3ae6c953ac3ceae8503663ab (patch) | |
| tree | d6f7dec0221392886ac2ff3127dbac57e41a8e99 /addons/document/document_directory.py | |
| parent | ad122fc9081cff00a6a9a78895e2e0c9ec3028d9 (diff) | |
| parent | 4b9d75408419a1ae1f51dde47ef4a7d4f89cc46d (diff) | |
[MERGE]
bzr revid: hmo@tinyerp.com-20100420055117-faxraazs6238y8yo
Diffstat (limited to 'addons/document/document_directory.py')
| -rw-r--r-- | addons/document/document_directory.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/document/document_directory.py b/addons/document/document_directory.py index b64ee8df9e2..91a6a2571fe 100644 --- a/addons/document/document_directory.py +++ b/addons/document/document_directory.py @@ -52,7 +52,7 @@ class document_directory(osv.osv): 'ressource_type_id': fields.many2one('ir.model', 'Directories Mapped to Objects', help="Select an object here and Open ERP will create a mapping for each of these " \ "objects, using the given domain, when browsing through FTP."), - 'resource_field': fields.char('Name field',size=32,help='Field to be used as name on resource directories. If empty, the "name" will be used.'), + 'resource_field': fields.many2one('ir.model.fields', 'Name field', help='Field to be used as name on resource directories. If empty, the "name" will be used.'), 'ressource_parent_type_id': fields.many2one('ir.model', 'Parent Model', help="If you put an object here, this directory template will appear bellow all of these objects. " \ "Don't put a parent directory if you select a parent model."), @@ -61,10 +61,12 @@ class document_directory(osv.osv): help="Check this if you want to use the same tree structure as the object selected in the system."), 'dctx_ids': fields.one2many('document.directory.dctx', 'dir_id', 'Context fields'), } + + def _get_root_directory(self, cr,uid, context=None): objid=self.pool.get('ir.model.data') try: - mid = objid._get_id(cr, uid, 'document', 'dir_root') + mid = objid._get_id(cr, uid, 'document', 'dir_root') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] |
