[FIX] small bug in address

bzr revid: fp@tinyerp.com-20111218114443-lary2ovig5tznwl8
This commit is contained in:
Fabien Pinckaers
2011-12-18 12:44:43 +01:00
parent 56fbd7c0b2
commit 0cfe50155d
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ class res_partner(osv.osv):
address_obj = self.pool.get('res.partner.address')
address_ids = address_obj.search(cr, uid, [('partner_id', 'in', ids)])
address_rec = address_obj.read(cr, uid, address_ids, ['type'])
res = list(tuple(addr.values()) for addr in address_rec)
res = list((addr['type'],addr['id']) 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
+5 -5
View File
@@ -82,7 +82,7 @@
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
<newline/>
<field name="name"/>
<field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="function"/>
</group>
<group colspan="2" col="2">
@@ -214,7 +214,7 @@
<field name="arch" type="xml">
<form string="Contacts">
<field name="name" select="1"/>
<field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="street"/>
<field name="street2"/>
<field name="type"/>
@@ -331,7 +331,7 @@
<group colspan="5" col="6">
<field name="name" select="1"/>
<field name="ref" groups="base.group_extended"/>
<field domain="[('domain', '=', 'partner')]" name="title" size="0" groups="base.group_extended" widget="selection"/>
<field domain="[('domain', '=', 'partner')]" name="title" size="0" groups="base.group_extended"/>
<field name="lang"/>
</group>
<group colspan="1" col="2">
@@ -345,8 +345,8 @@
<field colspan="4" mode="form,tree" name="address" nolabel="1" select="1" height="260">
<form string="Partner Contacts">
<group colspan="4" col="6">
<field name="name"/>
<field domain="[('domain', '=', 'contact')]" name="title" size="0" widget="selection"/>
<field name="name" string="Contact Name"/>
<field domain="[('domain', '=', 'contact')]" name="title" size="0"/>
<field name="function"/>
</group>
<newline/>