From 1eb3240e9e028d3342921b395fbacde410946573 Mon Sep 17 00:00:00 2001 From: ?ngel ?lvarez Date: Tue, 12 Jun 2018 17:22:09 +0200 Subject: [PATCH] fix lots by location --- location.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/location.py b/location.py index 83a8f97..b8e62d0 100644 --- a/location.py +++ b/location.py @@ -36,25 +36,14 @@ class LotsByLocation(Wizard): def do_open(self, action): pool = Pool() Location = pool.get('stock.location') - Lang = pool.get('ir.lang') context = {} context['locations'] = Transaction().context.get('active_ids') date = self.start.forecast_date or datetime.date.max context['stock_date_end'] = Date(date.year, date.month, date.day) action['pyson_context'] = PYSONEncoder().encode(context) - locations = Location.browse(context['locations']) - for code in [Transaction().language, 'en_US']: - langs = Lang.search([ - ('code', '=', code), - ]) - if langs: - break - lang = langs[0] - date = Lang.strftime(date, lang.code, lang.date) - action['name'] += ' - (%s) @ %s' % ( ','.join(l.name for l in locations), date) return action, {}