[FIX] Base_contact : Correction over the domain for contacts

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

bzr revid: support@serpentcs.com-20111227205742-umw4yb3uwu2ztm73
This commit is contained in:
Serpent Consulting Services 2011-12-28 02:27:42 +05:30
parent 76fa5eda36
commit 9985eeca4b
2 changed files with 5 additions and 3 deletions

View File

@ -169,7 +169,8 @@ class res_partner_address(osv.osv):
_inherit = 'res.partner.address'
def _default_location_id(self, cr, uid, context=None):
context = context or {}
if context is None:
context = {}
if not context.get('default_partner_id',False):
return False
ids = self.pool.get('res.partner.location').search(cr, uid, [('partner_id','=',context['default_partner_id'])], context=context)
@ -242,7 +243,8 @@ class res_partner_address(osv.osv):
}
def default_get(self, cr, uid, fields=[], context=None):
context = context or {}
if context is None:
context = {}
if 'default_type' in context:
del context['default_type']
return super(res_partner_address, self).default_get(cr, uid, fields, context)

View File

@ -91,7 +91,7 @@
<field name="arch" type="xml">
<search string="Partner Contact">
<field name="name" string="First/Lastname"
filter_domain="['|', ('firstname','ilike', self), ('lastname','ilike',self)]"/>
filter_domain="['|', ('first_name','ilike', self), ('last_name', 'ilike', self)]"/>
<field name="partner_id" string="Partner"/>
</search>
</field>