Odoo Help

1

Filter Invoices that are due within the next 7 days

By
Robert Klüsener
on 9/9/13, 7:23 AM 577 views

How can I filter all invoices that are due within the next 7 days? I tried the following code and it does not work out:

[['date_due', '<=', time.strftime('%Y-%m-%d %H:%M:%S',time.gmtime(time.time()+7243600))]]

0
Frank Kubsda
On 9/23/15, 4:33 AM

Hello Robert,


you can use:

domain = [('date_due','<=', (context_today()+datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d 23:59:59'),('date_due','>=',(context_today()).strftime('%%Y-%%m-%%d 00:00:00'))]


regards Frank


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 9/9/13, 7:23 AM
Seen: 577 times
Last updated: 1/18/17, 4:51 AM