diff options
| author | Mantavya Gajjar <mga@tinyerp.com> | 2010-04-20 02:36:35 +0530 |
|---|---|---|
| committer | Mantavya Gajjar <mga@tinyerp.com> | 2010-04-20 02:36:35 +0530 |
| commit | 5f197ef01f7f4224f5805b5dcdeecfee40aeb379 (patch) | |
| tree | a1d6a5b81bfe98800ef0c461b6594969f6c0b6d9 /addons/document/document_directory.py | |
| parent | f2f2bde0f3c0a09c8eb0cb841d6f2171ad83c735 (diff) | |
| parent | e55d830a7c76e8390bd2f533370424368339da4d (diff) | |
[MERGE]: merging from same branch
bzr revid: mga@tinyerp.com-20100419210635-fv7bhc6474l4blc8
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 270f2d9353f..c9c124cdfe0 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'] |
