[Fix] auction,delivery remove ref of .address
bzr revid: sbh@tinyerp.com-20120322104124-ferh00aj1gpqowlf
This commit is contained in:
parent
c90d8491ad
commit
09483d7449
|
@ -751,8 +751,8 @@ class auction_bid(osv.osv):
|
|||
if not partner_id:
|
||||
return {'value': {'contact_tel':False}}
|
||||
contact = self.pool.get('res.partner').browse(cr, uid, partner_id)
|
||||
if len(contact.address):
|
||||
v_contact=contact.address[0] and contact.address[0].phone
|
||||
if contact:
|
||||
v_contact=contact.phone
|
||||
else:
|
||||
v_contact = False
|
||||
return {'value': {'contact_tel': v_contact}}
|
||||
|
|
|
@ -80,7 +80,7 @@ class delivery_carrier(osv.osv):
|
|||
}
|
||||
|
||||
def grid_get(self, cr, uid, ids, contact_id, context=None):
|
||||
contact = self.pool.get('res.partner.address').browse(cr, uid, contact_id, context=context)
|
||||
contact = self.pool.get('res.partner').browse(cr, uid, contact_id, context=context)
|
||||
for carrier in self.browse(cr, uid, ids, context=context):
|
||||
for grid in carrier.grids_id:
|
||||
get_id = lambda x: x.id
|
||||
|
|
|
@ -99,7 +99,7 @@ class stock_picking(osv.osv):
|
|||
.property_account_income_categ.id
|
||||
|
||||
taxes = picking.carrier_id.product_id.taxes_id
|
||||
partner = picking.address_id.partner_id or False
|
||||
partner = picking.address_id or False
|
||||
if partner:
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, partner.property_account_position, account_id)
|
||||
taxes_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, partner.property_account_position, taxes)
|
||||
|
|
Loading…
Reference in New Issue