Odoo Help


Weekly Tasks in project

on 8/27/13, 4:01 PM 1,067 views


Is it possible to (some how) create one task which could be automatically repeated each week or every certain period of time?

I need to create a project which starts and end in the same week, and it is repeated every week. This project includes over 100 tasks, which I don't want to create manually every week. Also I would like this to get dates automatically for next week.

Any help? I really need some guidance with this

Thanks for reading

Carlos Llamacho
On 8/27/13, 5:37 PM

Well, i think you could create a function in your module that uses ORM methods to create the records for the new tasks, and then create an action that calls said function every week. The problem i would see is that you could end up with repeated tasks.

If you would like an outline of the code i think it would look like more or less like this....

def custom_function(self, cr, uid, context=None):
        task_obj = self.pool.get('project.task') #This get the object that hold all tasks.
        for i in range(101): #This would run the 100 new tasks.
               task_obj.create(cr, uid, {fields:value, fields:value}, context=None) #This create 100 new task.

Then you can create a cron job that calls that function.

<record id="ir_cron_100_tasks" model="ir.cron">
        <field name="name">100 Tasks</field>
        <field name="active" eval="True"/>
        <field name="interval_number">1</field>
        <field name="interval_type">weeks</field>
        <field name="numbercall">-1</field>
        <field name="doall" eval="False"/>
        <field name="model">Your_Model_Here</field>
        <field name="function">custom_function</field>
        <field name="args">()</field>

Hope it can help you.

Hello Carlos, I think I have no idea how to do that! Just saw your pic and its funny as the project I'm working on its scuba diving related

on 8/28/13, 5:46 AM

Jajaja, really? No idea, scuba diving for me is a hobby, never thought of being related to programming. But anyhow, how can i help you? Is the code? Regarding what you need help?

Carlos Llamacho
on 8/28/13, 12:22 PM

Im starting up a site called http://www.scubacrowd.com and it would really help if you helpme somehow to fix this do you think its possible to do what im tring to do with the project module?

on 8/28/13, 4:26 PM

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.


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

0 follower(s)


Asked: 8/27/13, 4:01 PM
Seen: 1067 times
Last updated: 3/16/15, 8:10 AM