diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-08-20 18:08:19 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-08-20 18:08:19 +0200 |
| commit | 235ed4b2c1099720a6d5cfc5ada920f19fcef315 (patch) | |
| tree | 2ddc3ae85462fe3cc6e70f9598958797695d12ff /addons/website_event/controllers/main.py | |
| parent | c3734ec5b622085a36e94bee36f92daabbae3e34 (diff) | |
| parent | 9ad5f26b3fb98cd14527de80d19bf6554a6981e2 (diff) | |
[MERGE] forward port branch saas-12 up to 9ad5f26
Diffstat (limited to 'addons/website_event/controllers/main.py')
| -rw-r--r-- | addons/website_event/controllers/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py index b201d492032..c0ec1c82708 100644 --- a/addons/website_event/controllers/main.py +++ b/addons/website_event/controllers/main.py @@ -194,8 +194,8 @@ class WebsiteEventController(http.Controller): def get_formated_date(self, event): start_date = fields.Datetime.from_string(event.date_begin).date() end_date = fields.Datetime.from_string(event.date_end).date() - month = babel.dates.get_month_names('abbreviated', locale=self.env.context.get('lang', 'en_US'))[start_date.month] - return ('%s %s%s') % (month, start_date.strftime("%e"), (end_date != start_date and ("-"+end_date.strftime("%e")) or "")) + month = babel.dates.get_month_names('abbreviated', locale=event.env.context.get('lang', 'en_US'))[start_date.month] + return ('%s %s%s') % (month, start_date.strftime("%e"), (end_date != start_date and ("-" + end_date.strftime("%e")) or "")) @http.route('/event/get_country_event_list', type='http', auth='public', website=True) def get_country_events(self, **post): |
