Teachers - Education Program mailing list archives

teachers@mail.odoo.com

display the result of a Requette sql in a table in the view

by
omar
- 01/11/2016 09:13:17
i can use this method for disably a taxes grouped by name tax def _select(self):
    res = []
    select_str = """select at.name, sum(solt.price_tax)
    from sale_order_line solt,account_tax_sale_order_line_rel atsolr,account_tax at
    where solt.id=atsolr.sale_order_line_id
    and atsolr.account_tax_id=at.id
    and solt.order_id="""+self.order_id+ """
     group by at.name;"""
    self.execute(select_str)
    for t in self.dictfetchall():
        res.append({
                    'sum_tax':t['sum'],
                    'name_tax':t['name'],
                         })
    return res
wich methode can you use in this problem
thinks