Browse Source

[MIG] Migrate the module to v8.0

pull/375/head
Tu Bui 9 years ago
committed by Moisés López
parent
commit
5ba917984f
No known key found for this signature in database GPG Key ID: F49F27BE918BFA35
  1. 9
      profiler/__openerp__.py
  2. 5
      profiler/controllers.py
  3. 14
      profiler/views/profiler.xml

9
profiler/__openerp__.py

@ -22,7 +22,7 @@
#============================================================================== #==============================================================================
{ {
'name': 'profiler', 'name': 'profiler',
'version': '0.1',
'version': '8.0.0.1',
'category': 'devtools', 'category': 'devtools',
'description': """ 'description': """
cprofile integration for Odoo/OpenERP. Check the Profiler menu in admin menu cprofile integration for Odoo/OpenERP. Check the Profiler menu in admin menu
@ -32,16 +32,11 @@
'depends': ['base', 'web'], 'depends': ['base', 'web'],
'data': [ 'data': [
'security/group.xml', 'security/group.xml',
],
'js': [
'static/src/js/player.js',
'views/profiler.xml'
], ],
'qweb': [ 'qweb': [
'static/src/xml/player.xml', 'static/src/xml/player.xml',
], ],
'css': [
'static/src/css/player.css',
],
'installable': True, 'installable': True,
'application': False, 'application': False,
'auto_install': False, 'auto_install': False,

5
profiler/controllers.py

@ -56,9 +56,10 @@ class ProfilerController(openerpweb.Controller):
return request.make_response( return request.make_response(
stream, stream,
headers=[ headers=[
('Content-Disposition', 'attachment; filename="%s"' % filename),
('Content-Disposition',
'attachment; filename="%s"' % filename),
('Content-Type', 'application/octet-stream') ('Content-Type', 'application/octet-stream')
], cookies={'fileToken': int(token)})
], cookies={'fileToken': token})
@openerpweb.jsonrequest @openerpweb.jsonrequest
def initial_state(self, request): def initial_state(self, request):

14
profiler/views/profiler.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- vim:fdn=3: -->
<openerp>
<data>
<template id="profiler_assets_backend" name="profiler assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/profiler/static/src/css/player.css" />
<script type="text/javascript" src="/profiler/static/src/js/player.js" />
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save