[FIX] Base : Added active field in address view in order to let the user deactivate the address

lp bug: https://launchpad.net/bugs/795018 fixed

bzr revid: ira@tinyerp.com-20110621053700-p9syely27nm0sqbh
This commit is contained in:
Ila Rana 2011-06-21 11:07:00 +05:30
parent 7494cfa301
commit f7dbab8db7
2 changed files with 2 additions and 1 deletions

View File

@ -222,7 +222,7 @@ class res_partner(osv.osv):
return True
def address_get(self, cr, uid, ids, adr_pref=['default']):
cr.execute('select type,id from res_partner_address where partner_id IN %s',(tuple(ids),))
cr.execute('select type,id from res_partner_address where partner_id IN %s and active',(tuple(ids),))
res = cr.fetchall()
adr = dict(res)
# get the id of the (first) default address if there is one,

View File

@ -99,6 +99,7 @@
<field name="fax"/>
<field name="mobile"/>
<field name="email" widget="email"/>
<field name="active"/>
</group>
</form>
</field>