Skip to Content
Menu
This question has been flagged
3751 Zobrazenia


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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
apr 23
1662
1
aug 25
584
3
máj 25
1743
1
apr 25
1290
3
sep 24
14205