1234567891011121314151617181920212223242526272829303132333435363738 |
- # -*- coding: utf-8 -*-
- from openerp.http import request as r
- def get_contract_line_inmobiliaria():
- query = '''
- SELECT
- line.id,
- line.analytic_account_id,
- line.name,
- line.quantity,
- line.price_unit,
- tmp.t_manzana,
- tmp.t_lote,
- tmp.t_nro,
- tmp.t_propietario
- FROM account_analytic_invoice_line AS line
- LEFT JOIN product_product AS product
- ON line.product_id = product.id
- LEFT JOIN product_template AS tmp
- ON product.product_tmpl_id = tmp.id
- '''
- r.cr.execute(query)
- return [
- {
- 'id': j[0],
- 'analytic_account_id': j[1],
- 'name': j[2],
- 'quantity': j[3],
- 'price_unit': j[4],
- 't_manzana': j[5],
- 't_lote': j[6],
- 't_nro': j[7],
- 't_propietario':j[8],
- } for j in r.cr.fetchall()
- ]
|