Skip to content
Snippets Groups Projects
Commit d4d820f0 authored by Swapnesh Shah's avatar Swapnesh Shah Committed by Adrian Torres
Browse files

[FIX] pos_sale: convert string -> datetime.date

fixes #27467

closes odoo/odoo#27468
parent 87a97802
Branches
Tags
No related merge requests found
......@@ -91,7 +91,7 @@ class CrmTeam(models.Model):
)
if self.dashboard_graph_group_pos == 'day':
for data_point in order_data:
result.append({'x_value': fields.Date.to_string((fields.datetime.strptime(data_point.get('date:day'), "%d %b %Y"))), 'y_value': data_point.get('price_total')})
result.append({'x_value': fields.Date.to_date(datetime.strptime(data_point.get('date:day'), "%d %b %Y")), 'y_value': data_point.get('price_total')})
elif self.dashboard_graph_group_pos == 'week':
for data_point in order_data:
result.append({'x_value': int(data_point.get('date:week')[1:3]), 'y_value': data_point.get('price_total')})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment