[TMP] filter and group date OK

This commit is contained in:
michel 2018-02-05 17:02:55 +01:00
parent ee432805c4
commit 68480e421d

View File

@ -71,15 +71,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
context="{'group_by': 'payment_date:month'}"/>
</group>
<filter name="payment_7_days" string="payment in 7 days"
domain="[('state','=', 'draft'), ('payment_date','&lt;=', datetime.datetime.combine(context_today() + datetime.timedelta(days=7), datetime.time(23,59,59))),
('payment_date','&gt;=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" />
<separator />
<filter name="payment_30_days" string="payment in 30 days"
domain="[('state','=', 'draft'), ('payment_date','&lt;=', datetime.datetime.combine(context_today() + datetime.timedelta(days=30), datetime.time(23,59,59))),
('payment_date','&gt;=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" />
domain="[('state','=', 'draft'),
('payment_date','&lt;=', (context_today() + datetime.timedelta(days=7)).strftime('%Y-%m-%d')),
('payment_date','&gt;=', context_today().strftime('%Y-%m-%d'))]" />
<filter name="payment_30_days" string="payment in 30 days"
domain="[('state','=', 'draft'),
('payment_date','&lt;=', (context_today() + datetime.timedelta(days=30)).strftime('%Y-%m-%d')),
('payment_date','&gt;=', context_today().strftime('%Y-%m-%d'))]" />
<separator />
<filter name="payment_delayed" string="Payment delayed"
domain="[('state','=', 'draft'), ('payment_date','&gt;=', context_today())]" />
domain="[('state','=', 'draft'), ('payment_date','&gt;=', context_today().strftime('%Y-%m-%d'))]" />
</search>
</field>
</record>