[FIX] point_of_sale: tz fallback

The user timezone fallback in case the user
has no timezone wasn't set at the right place.

This is an oversight of the revision
9f0120d73b

opw-670778
This commit is contained in:
Denis Ledoux 2016-02-29 16:55:19 +01:00
parent 9f0120d73b
commit 479f6ff48e
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ class pos_details(report_sxw.rml_parse):
result = {}
user_ids = form['user_ids'] or self._get_all_users()
company_id = user_obj.browse(self.cr, self.uid, self.uid).company_id.id
user = self.pool['res.users'].browse(self.cr, self.uid, self.uid) or self.localcontext.get('tz') or 'UTC'
tz_name = user.tz
user = self.pool['res.users'].browse(self.cr, self.uid, self.uid)
tz_name = user.tz or self.localcontext.get('tz') or 'UTC'
user_tz = pytz.timezone(tz_name)
between_dates = {}
for date_field, delta in {'date_start': {'days': 0}, 'date_end': {'days': 1}}.items():