+ Allow records to be grouped by hour. Similar to the already
+ existing options (
+ day, week, month, quarter, year
+ ). Just add the paramerter
+ groupby='date:hour'
+ like shown below.
+
+
+@api.multi
+def sales_per_hour(self):
+ daily_sales = self.env['sale.report'].read_group(
+ domain=[],
+ fields=['date', 'price_subtotal'],
+ groupby='date:hour')
+ return daily_sales
+
+
+