[REF] Base_contact : search() of Address corrected

bzr revid: jvo@tinyerp.com-20100517063431-glyy8cejapfusb51
This commit is contained in:
Jay (Open ERP)
2010-05-17 12:04:31 +05:30
parent 6e4955ec78
commit d506eb1c89
+3 -2
View File
@@ -127,8 +127,9 @@ class res_partner_address(osv.osv):
@param limit: The Number of Results to Return
@param context: A standard dictionary for contextual values
"""
if context and context.has_key('address_partner_id' ) and context['address_partner_id']:
if context is None:
context = {}
if context.get('address_partner_id',False):
args.append(('partner_id', '=', context['address_partner_id']))
return super(res_partner_address, self).search(cr, user, args, offset, limit, order, context, count)