openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00751
how to access context in my own method/function?
Hi!
I'm using fields.function in a tree view:
_columns = {
'qty2_test' : fields.function(_calc_price, arg=2 , type = 'float', method =
True, string = _get_qty(2) ),
in "_calc_price" it is no problem to access the context:
def _calc_price(self, cr, uid, ids, field, arg, context=None):
form = context['form']
but how can I do it in "_get_qty" ?
my goal ist to have different healines/labels for the colums depending on the
context.
thank you for any help & hints,
Martin
Follow ups