[REF]res_partner: compact code to get tz info

bzr revid: csn@openerp.com-20130515101027-4nc06nr2u41jh1wr
This commit is contained in:
Cedric Snauwaert
2013-05-15 12:10:27 +02:00
+2 -1
View File
@@ -74,7 +74,8 @@ class format_address(object):
def _tz_get(self,cr,uid, context=None):
return [(x, x) for x in pytz.all_timezones]
# put POSIX 'Etc/*' entries at the end to avoid confusing users - see bug 1086728
return [(tz,tz) for tz in sorted(pytz.all_timezones, key=lambda tz: tz if not tz.startswith('Etc/') else '_')]
class res_partner_category(osv.osv):