~vauxoo/addons-vauxoo/7.0-project_issue_conf-dev_luis

« back to all changes in this revision

Viewing changes to deliver_project/model/module.py

 
[MERGE] Merge to add all changes in trunk series

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        # VIEWS AND REPORTS AND MENUS RELATED TO ONE SPECIFIC MODULE
129
129
        view_id = model_data_obj.search(
130
130
            cr, uid, [('module', 'in', mnames.keys()),
131
 
                      ('model', 'in', ('ir.ui.view', 'ir.actions.report.xml', 'ir.ui.menu', 'ir.actions.act_window'))])
 
131
                      ('model', 'in', ('ir.ui.view', 'ir.actions.report.xml',
 
132
                                    'ir.ui.menu', 'ir.actions.act_window'))])
132
133
#            ('model','in',('ir.ui.view','ir.actions.report.xml','ir.ui.menu','ir.actions.act_window'))])
133
134
        for data_id in model_data_obj.browse(cr, uid, view_id, context):
134
135
            # We use try except, because views or menus may not exist
143
144
                        if menu.action:
144
145
                            print "-.-.-.-.-.-.-.-.-.-.-.-.- %s" % data_id.name
145
146
                            res_mod_dic[
146
 
                                'doc_on_module'].append("%s" % self.format_help(cr, uid,
147
 
                                                                                {'MenuName': menu.name,
148
 
                                                                                 'CompleteMenuName': menu.complete_name,
149
 
                                                                                 'ActionHelp': menu.action.help,
150
 
                                                                                 'ModuleName': data_id.module,
151
 
                                                                                 'XmlId': data_id.name},
152
 
                                                                                context=context))
 
147
                                'doc_on_module'].append("%s" %
 
148
                                    self.format_help(cr, uid,
 
149
                                        {'MenuName': menu.name,
 
150
                                         'CompleteMenuName': menu.complete_name,
 
151
                                         'ActionHelp': menu.action.help,
 
152
                                         'ModuleName': data_id.module,
 
153
                                         'XmlId': data_id.name},
 
154
                                        context=context))
153
155
                            res_mod_dic[
154
156
                                'doc_on_module'].append(self.title_help(cr, uid,
155
 
                                                                        mnames[data_id.module], data_id.module, context=context))
 
157
                                        mnames[data_id.module],
 
158
                                        data_id.module, context=context))
156
159
            except KeyError, e:
157
160
                self.__logger.warning(
158
161
                    'Data not found for reference %s[%s:%s.%s]', data_id.model,
160
163
                pass
161
164
            except Exception, e:
162
165
                self.__logger.warning('Unknown error while browsing %s[%s]',
163
 
                                      data_id.model, data_id.res_id, exc_info=True)
 
166
                                        data_id.model, data_id.res_id,
 
167
                                        exc_info=True)
164
168
                pass
165
169
        # res_mod_dic['doc_on_module']=list(set(res_mod_dic['doc_on_module']))
166
170
        for key, value in res.iteritems():
172
176
        return res
173
177
 
174
178
    _columns = {
175
 
        'doc_on_module': fields.function(_get_docs, method=True, string='Documentation', type='text', multi="meta", store=False),
 
179
        'doc_on_module': fields.function(_get_docs, method=True,
 
180
            string='Documentation', type='text', multi="meta", store=False),
176
181
    }
177
 
 
178
 
module()