[FIX] pos_sale: convert string -> datetime.date
fixes #27467 closes odoo/odoo#27468
This commit is contained in:
committed by
Adrian Torres
parent
87a9780270
commit
d4d820f0bb
@@ -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')})
|
||||
|
||||
Reference in New Issue
Block a user