[MERGE] Merged IRA's branch for the fix of correction in address_get method and addition of active field in address (case:6198)

bzr revid: pso@tinyerp.com-20110701065837-qmzxvichj0sr6l1v
This commit is contained in:
pso (OpenERP)
2011-07-01 12:28:37 +05:30
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -222,8 +222,10 @@ 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),))
res = cr.fetchall()
address_obj = self.pool.get('res.partner.address')
address_ids = address_obj.search(cr, uid, [('partner_id', '=', ids)])
address_rec = address_obj.read(cr, uid, address_ids, ['type'])
res = list(tuple(addr.values()) for addr in address_rec)
adr = dict(res)
# get the id of the (first) default address if there is one,
# otherwise get the id of the first address in the list
@@ -77,6 +77,7 @@
<form string="Address">
<group colspan="4" col="6">
<field name="partner_id" colspan="2"/>
<field name="active"/>
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
<newline/>
<field name="name"/>