~ubuntu-branches/ubuntu/lucid/openerp-client/lucid

« back to all changes in this revision

Viewing changes to bin/modules/action/main.py

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-08-24 20:13:33 UTC
  • mfrom: (1.1.7 upstream)
  • mto: (11.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20090824201333-5at7951slr8uhcyw
Tags: upstream-5.0.3-0
ImportĀ upstreamĀ versionĀ 5.0.3-0

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
                win=datas['window']
147
147
                del datas['window']
148
148
            datas['report_id'] = action['report_id']
149
 
            self.exec_report('custom', datas)
 
149
            self.exec_report('custom', datas, context)
150
150
 
151
151
        elif action['type']=='ir.actions.report.xml':
152
152
            if 'window' in datas:
153
153
                win=datas['window']
154
154
                del datas['window']
155
 
 
156
 
            self.exec_report(action['report_name'], datas)
 
155
            self.exec_report(action['report_name'], datas, context)
157
156
 
158
157
        elif action['type']=='ir.actions.act_url':
159
158
            tools.launch_browser(action.get('url',''))
170
169
            except rpc.rpc_exception, e:
171
170
#               common.error(_('Error: ')+str(e.type), e.message, e.data)
172
171
                return False
173
 
 
174
172
        keyact = {}
175
173
        for action in actions:
176
 
            keyact[action['name']] = action
 
174
            keyact[action['name'].encode('utf8')] = action
177
175
        keyact.update(adds)
178
176
 
179
177
        res = common.selection(_('Select your action'), keyact)