You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB

7 years ago
  1. <section class="oe_container">
  2. <div class="oe_row oe_spaced">
  3. <h2 class="oe_slogan">MuK Groupby Hour</h2>
  4. <h3 class="oe_slogan">Group records by hour</h3>
  5. <h4 class="oe_slogan" style="font-size: 23px;">MuK IT GmbH -
  6. www.mukit.at</h4>
  7. </div>
  8. </section>
  9. <section class="oe_container">
  10. <div class="oe_row oe_spaced">
  11. <div class="oe_picture">
  12. <h3 class="oe_slogan">Overview</h3>
  13. <div class="oe_mt32"
  14. style="padding-bottom: 10px; text-align: justify;">
  15. <p>
  16. Allow records to be grouped by hour. Similar to the already
  17. existing options (
  18. <code>day, week, month, quarter, year</code>
  19. ). Just add the paramerter
  20. <code>groupby='date:hour'</code>
  21. like shown below.
  22. </p>
  23. </div>
  24. <pre>
  25. <code>
  26. @api.multi
  27. def sales_per_hour(self):
  28. daily_sales = self.env['sale.report'].read_group(
  29. domain=[],
  30. fields=['date', 'price_subtotal'],
  31. groupby='date:hour')
  32. return daily_sales
  33. </code>
  34. </pre>
  35. </div>
  36. </div>
  37. </section>
  38. <section class="oe_container oe_dark">
  39. <h3 class="oe_slogan">Help and Support</h3>
  40. <div class="oe_slogan">
  41. <a class="btn btn-primary btn-lg mt8" href="mailto:sale@mukit.at">
  42. <i class="fa fa-envelope"></i> Email
  43. </a> <a class="btn btn-primary btn-lg mt8"
  44. href="https://mukit.at/page/contactus"> <i class="fa fa-phone"></i>
  45. Contact
  46. </a>
  47. </div>
  48. <img src="logo.png" style="width: 200px; margin-bottom: 20px;"
  49. class="center-block">
  50. </section>