Namaste, I have tax field which I want to be required for a particular company, I have tried this code in company onchange:
if company_id == self.env.ref('x.company').id:
cr, uid, context = self.env.args
context = dict(context)
context.update({'filter_comp': True})
self.env.args = cr, uid, misc.frozendict(context)
and iN XML
attrs="{'readonly':[('state','not in','draft')],
'required':[('company_id','=',context.get('filter_comp',False))]}"/>
it says context is not defined. Am I doing something wrong here?
if not, how can i achieve this?