From 58a501674adf72411e0c67420b059eb869058eae Mon Sep 17 00:00:00 2001 From: Alejandro Santana Date: Wed, 21 Jan 2015 21:30:43 +0100 Subject: [PATCH] [FIX] base_location: Removed unnecesary temporary variable. --- base_location/models/partner.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/base_location/models/partner.py b/base_location/models/partner.py index b0234d8a7..c16ae83b1 100644 --- a/base_location/models/partner.py +++ b/base_location/models/partner.py @@ -31,8 +31,7 @@ class ResPartner(models.Model): @api.onchange('zip_id') def onchange_zip_id(self): if self.zip_id: - bzip = self.zip_id[0] - self.zip = bzip.name - self.city = bzip.city - self.state_id = bzip.state_id - self.country_id = bzip.country_id + self.zip = self.zip_id.name + self.city = self.zip_id.city + self.state_id = self.zip_id.state_id + self.country_id = self.zip_id.country_id