[REF]res_partner: compact code to get tz info
bzr revid: csn@openerp.com-20130515101027-4nc06nr2u41jh1wr
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user