diff options
| author | Kuldeep Joshi (OpenERP) <kjo@tinyerp.com> | 2012-02-02 15:57:13 +0530 |
|---|---|---|
| committer | Kuldeep Joshi (OpenERP) <kjo@tinyerp.com> | 2012-02-02 15:57:13 +0530 |
| commit | 580bd71dc7a0e1db5e9bf1a716893d637d1bbdbe (patch) | |
| tree | 174a6345ce4e70dad8fde3f65889095728fa0f2d /addons/base_module_doc_rst/wizard/generate_relation_graph.py | |
| parent | c7013988a265a966f03e555939e674e791c5559c (diff) | |
| parent | 48cc23e6e1c16d5c8f37b6bfc9d406449a35587e (diff) | |
[FIX] base_module_record,base_module_doc_rst: change to osv.osv_memory
bzr revid: kjo@tinyerp.com-20120202102713-a0y7medo4izgrd71
Diffstat (limited to 'addons/base_module_doc_rst/wizard/generate_relation_graph.py')
| -rw-r--r-- | addons/base_module_doc_rst/wizard/generate_relation_graph.py | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/addons/base_module_doc_rst/wizard/generate_relation_graph.py b/addons/base_module_doc_rst/wizard/generate_relation_graph.py index 9f789f0cc7a..5d2b7e9d3ef 100644 --- a/addons/base_module_doc_rst/wizard/generate_relation_graph.py +++ b/addons/base_module_doc_rst/wizard/generate_relation_graph.py @@ -20,30 +20,22 @@ ############################################################################## import wizard from osv import osv +from osv import fields import pooler from tools.translate import _ -form_rep = '''<?xml version="1.0"?> -<form string="Relationship Graph"> - <label colspan="2" string="(Relationship Graphs generated)" align="0.0"/> -</form>''' +class create_graph(osv.osv_memory): + _name = "create.relation.graph" -def _get_graph(self, cr, uid, datas, context=None): - mod_obj = pooler.get_pool(cr.dbname).get('ir.module.module') - modules = mod_obj.browse(cr, uid, datas['ids'], context=context) - for module in modules: - module_data = mod_obj.get_relation_graph(cr, uid, module.name, context=context) - if module_data['module_file']: - mod_obj.write(cr, uid, [module.id], {'file_graph': module_data['module_file']}, context=context) - return {'type': 'ir.actions.act_window_close'} + def get_graph(self, cr, uid, datas, context=None): + mod_obj = pooler.get_pool(cr.dbname).get('ir.module.module') + modules = mod_obj.browse(cr, uid, context['ids'], context=context) + for module in modules: + module_data = mod_obj.get_relation_graph(cr, uid, module.name, context=context) + if module_data['module_file']: + mod_obj.write(cr, uid, [module.id], {'file_graph': module_data['module_file']}, context=context) + return {'type': 'ir.actions.act_window_close'} -class create_graph(wizard.interface): - states = { - 'init': { - 'actions': [_get_graph], - 'result': {'type': 'form', 'arch': form_rep, 'fields': {}, 'state': [('end','Ok')]} - }, - } -create_graph('create.relation.graph') +create_graph() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file |
