mirror of https://github.com/muk-it/muk_base
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.
52 lines
1.4 KiB
52 lines
1.4 KiB
<section class="oe_container">
|
|
<div class="oe_row oe_spaced">
|
|
<h2 class="oe_slogan">MuK Groupby Hour</h2>
|
|
<h3 class="oe_slogan">Group records by hour</h3>
|
|
<h4 class="oe_slogan" style="font-size: 23px;">MuK IT GmbH -
|
|
www.mukit.at</h4>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="oe_container">
|
|
<div class="oe_row oe_spaced">
|
|
<div class="oe_picture">
|
|
<h3 class="oe_slogan">Overview</h3>
|
|
<div class="oe_mt32"
|
|
style="padding-bottom: 10px; text-align: justify;">
|
|
<p>
|
|
Allow records to be grouped by hour. Similar to the already
|
|
existing options (
|
|
<code>day, week, month, quarter, year</code>
|
|
). Just add the paramerter
|
|
<code>groupby='date:hour'</code>
|
|
like shown below.
|
|
</p>
|
|
</div>
|
|
<pre>
|
|
<code>
|
|
@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
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="oe_container oe_dark">
|
|
<h3 class="oe_slogan">Help and Support</h3>
|
|
<div class="oe_slogan">
|
|
<a class="btn btn-primary btn-lg mt8" href="mailto:sale@mukit.at">
|
|
<i class="fa fa-envelope"></i> Email
|
|
</a> <a class="btn btn-primary btn-lg mt8"
|
|
href="https://mukit.at/page/contactus"> <i class="fa fa-phone"></i>
|
|
Contact
|
|
</a>
|
|
</div>
|
|
<img src="logo.png" style="width: 200px; margin-bottom: 20px;"
|
|
class="center-block">
|
|
</section>
|