12345678910111213141516171819202122232425262728 |
- # -*- coding: utf-8 -*-
- from openerp.http import request as r
- def get_report_report():
- query = '''
- SELECT
- report.id,
- report.name,
- report.name_template,
- report.description,
- report.icon_code,
- report.category_id
- FROM report_report AS report
- ORDER BY report.sequence
- '''
- r.cr.execute(query)
- return [
- {
- 'id': j[0],
- 'name': j[1],
- 'name_template': j[2],
- 'description': j[3],
- 'icon_code': j[4],
- 'category_id': j[5],
- } for j in r.cr.fetchall()
- ]
|