← Back to team overview

openerp-community team mailing list archive

Re: how to access context in my own method/function?

 

Thanks for your answer, Niels.
I now have my own  fields_view_get and it is beeing executed (I see the output 
of my print on cosole) and the return-dict "res" looks o.k. but the tree view 
did not change.

    def fields_view_get(self, cr, uid, view_id=None, view_type='tree', 
context=None, toolbar=False, submenu=False):
        res = super(pricelist_screen,self).fields_view_get(cr, uid, view_id, 
view_type, context, toolbar=toolbar, submenu=submenu)
        
        form = context['form']
        qty1 = form['qty1']
        res['fields']['qty1_test']['string']=`qty1`
        print 'hallo'
        print res
        return res

 _columns = {
      'qty1_test' : fields.function(_calc_price, arg=1 , type = 'float', 
method = True, string = 'placeholder'),

    


Follow ups

References