İçereği Atla
Menü
Bu soru işaretlendi
3763 Görünümler


In the image it can be seen that the last three columns don't have headers. These last three fields were created dynamically like so:

def __init__(self, pool, cr):
        cr.execute("select id,name from stock_warehouse")
        for row in cr.fetchall():
            self._columns["qty_warehouse_%s"%row[0]] = fields.function(get_qty_warehouse, type="float", method=False, string=row[1], multi="qtys")
        return super(reporte_almacenes, self).__init__(pool, cr)

The output of the fields_get method called when the view is to be displayed shows that the correct string is being passed so what could be the problem? What else does the web client needs to correctly display a field?

Output of fields get:

qty_warehouse_2 {'function': 'get_qty_warehouse', 'digits': (16, 2), 'fnct_inv': False, 'fnct_inv_arg': False, 'readonly': 1, 'fnct_search': False, 'type': 'float', 'store': False, 'string': u'Bodega'}
qty_warehouse_3 {'function': 'get_qty_warehouse', 'digits': (16, 2), 'fnct_inv': False, 'fnct_inv_arg': False, 'readonly': 1, 'fnct_search': False, 'type': 'float', 'store': False, 'string': u'Tienda'}
qty_warehouse_1 {'function': 'get_qty_warehouse', 'digits': (16, 2), 'fnct_inv': False, 'fnct_inv_arg': False, 'readonly': 1, 'fnct_search': False, 'type': 'float', 'store': False, 'string': u'Your Company'}

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Nis 23
1672
1
Ağu 25
588
3
May 25
1754
1
Nis 25
1294
3
Eyl 24
14209