# -*- coding: utf-8 -*- from openerp.http import request as r def get_account_period(): query = ''' SELECT id, name, company_id, date_start, date_stop FROM account_period WHERE special = False ''' r.cr.execute(query) return [ { 'id': j[0], 'name': j[1], 'company_id': j[2], 'date_start': j[3], 'date_stop': j[4], } for j in r.cr.fetchall() ]