Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3757 Näkymät


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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
huhtik. 23
1668
1
elok. 25
586
3
toukok. 25
1748
1
huhtik. 25
1292
3
syysk. 24
14207