Odoo Help

Welcome!

This community 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.

1

Project module: HOWTO filter 'current_week'

By
Laurens
on 6/5/13, 11:28 AM 1,235 views

Are there any modules facilitating printing out a weekly report from the 'Tasks' section under 'Projects'? Or any other apps providing additional functionality?

I can create a custom report and link it to the project.task object. This way I have a print button on the FormView of my tasks. Alternatively I can also select certain tasks under TreeView and print out multiple reports at once.

Now I'm lookin in to possible solutions to create a weekly schedule.

  • Use the "current week" filter, then selecting the checbox for 'all' under the TreeView and printing out all the reports in one report. This would rely on some code present in the action, or in .rml file, that specifies all selected objects must be printed within the same report. Rather than all of them being on separate pages.

  • Create a button that will automatically look at 'current_week' and print a report that includes all the tasks from 'current_week'. Add this button under CalendarView by adding it to the header section in FormView.

I found a filter for current_date, but haven't yet found a way to filter on current week. I also don't know how to use a function that will make a selection based on certain criteria (current week) and print said objects.

If anyone is aware of any similar functions, or has some feedback on this matter. I'd greatly appreciate your insight.

Thanks for taking the time to read this.

0
Laurens
On 6/11/13, 11:18 AM

Solution for filter:

[('date_start','>=', ((context_today()).strftime('%Y-%m-%d'))), ('date_start','<=', ((context_today()+datetime.timedelta(days=7)).strftime('%Y-%m-%d')))]

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/5/13, 11:28 AM
Seen: 1235 times
Last updated: 3/16/15, 8:10 AM