[IMP]:Improve onchange
bzr revid: aja@tinyerp.com-20121025100629-dxjw5wsgi10pv2zz
This commit is contained in:
parent
9954cd3d08
commit
8bc8b450ef
|
@ -897,8 +897,10 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
return True
|
||||
|
||||
def onchange_state(self, cr, uid, ids, state_id, context=None):
|
||||
state=self.pool.get('res.country.state').browse(cr, uid, state_id, context)
|
||||
return {'value':{'country_id':state.country_id.id,'zip':''}}
|
||||
if state_id:
|
||||
state=self.pool.get('res.country.state').browse(cr, uid, state_id, context)
|
||||
return {'value':{'state_id':state_id,'country_id':state.country_id.id,'zip':''}}
|
||||
return {'value':{'state_id':state_id,'country_id':'','zip':''}}
|
||||
crm_lead()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue