diff options
| author | Parth Gajjar (Open ERP) <pga@tinyerp.com> | 2013-05-08 18:16:39 +0530 |
|---|---|---|
| committer | Parth Gajjar (Open ERP) <pga@tinyerp.com> | 2013-05-08 18:16:39 +0530 |
| commit | 2c6aeae9112de0ec0d39f8cdbb0690747ecfaa77 (patch) | |
| tree | 31ded50792f7f6fc6a9536c4d2d52e914a087c26 /addons/document | |
| parent | 4ed6734b82f199952f672a812478b283342125ed (diff) | |
| parent | 389f4911147b7cf5191b93e025c7b5c39d9e9eb6 (diff) | |
[MERGE]
bzr revid: pga@tinyerp.com-20130508124639-wfb2mpy15tnzs787
Diffstat (limited to 'addons/document')
| -rw-r--r-- | addons/document/document.py | 13 | ||||
| -rw-r--r-- | addons/document/document_view.xml | 4 | ||||
| -rw-r--r-- | addons/document/wizard/document_configuration.py | 1 |
3 files changed, 9 insertions, 9 deletions
diff --git a/addons/document/document.py b/addons/document/document.py index 9b1fdc1d66b..54f12e204fe 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -137,7 +137,7 @@ class document_file(osv.osv): It is a hack that will try to discover if the mentioned record is clearly associated with a partner record. """ - obj_model = self.pool.get(res_model) + obj_model = self.pool[res_model] if obj_model._name == 'res.partner': return res_id elif 'partner_id' in obj_model._columns and obj_model._columns['partner_id']._obj == 'res.partner': @@ -422,7 +422,6 @@ class document_directory_content(osv.osv): tname = '' if content.include_name: record_name = node.displayname or '' - # obj = node.context._dirobj.pool.get(model) if record_name: tname = (content.prefix or '') + record_name + (content.suffix or '') + (content.extension or '') else: @@ -1296,9 +1295,9 @@ class node_res_dir(node_class): Note that many objects use NULL for a name, so we should better call the name_search(),name_get() set of methods """ - obj = self.context._dirobj.pool.get(self.res_model) - if not obj: + if self.res_model not in self.context._dirobj.pool: return [] + obj = self.context._dirobj.pool[self.res_model] dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() @@ -1333,7 +1332,7 @@ class node_res_dir(node_class): if self.ressource_tree: object2 = False if self.resm_id: - object2 = dirobj.pool.get(self.res_model).browse(cr, uid, self.resm_id) or False + object2 = dirobj.pool[self.res_model].browse(cr, uid, self.resm_id) or False if obj._parent_name in obj.fields_get(cr, uid): where.append((obj._parent_name,'=',object2 and object2.id or False)) @@ -1504,7 +1503,7 @@ class node_res_obj(node_class): ctx = self.context.context.copy() ctx.update(self.dctx) directory = dirobj.browse(cr, uid, self.dir_id) - obj = dirobj.pool.get(self.res_model) + obj = dirobj.pool[self.res_model] where = [] res = [] if name: @@ -1590,7 +1589,7 @@ class node_res_obj(node_class): uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) - res_obj = dirobj.pool.get(self.res_model) + res_obj = dirobj.pool[self.res_model] object2 = res_obj.browse(cr, uid, self.res_id) or False diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml index 68f294b251c..c3bd5ad3f56 100644 --- a/addons/document/document_view.xml +++ b/addons/document/document_view.xml @@ -258,7 +258,9 @@ name="Documents" action="action_document_file_form" id="menu_document_files" - parent="menu_document_doc"/> + parent="menu_document_doc" + sequence="0" + /> <record model="ir.actions.act_window" id="action_document_file_directory_form"> <field name="type">ir.actions.act_window</field> diff --git a/addons/document/wizard/document_configuration.py b/addons/document/wizard/document_configuration.py index aec7f9b75a4..c846f288112 100644 --- a/addons/document/wizard/document_configuration.py +++ b/addons/document/wizard/document_configuration.py @@ -109,6 +109,5 @@ class document_configuration(osv.osv_memory): 'domain': '[]', 'ressource_tree': 1 }) -document_configuration() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
