Skip to Content
  • +43 (0) 1 774 03 92 - 450   hello@suppliot.eu  Jetzt kostenlose Demo sichern!
  • Follow us
    ​ ​ ​
SUPPLiot
  • Services
    Menü Icon Odoo

    Odoo

    We 💙 Odoo. Why we and 12 million users worldwide rely on Odoo, you can find out here.
    Menü Icon Implementierung

    Implementation

    We fully support you with the ERP implementation with Odoo. Learn more about our project process here.
    Menü Icon Consulting

    Consulting

    ​As an official partner, we are happy to share our expertise and experience as part of our consulting solutions.
    Menü Icon Individualentwicklung

    Custom

    With our German-speaking in-house development team, we also realise individual requirements.
  • Solutions
    Menü Icon Apps & Lösungen

    Apps

    Odo's numerous modules provide the perfect basis. Our apps solve additional requirements or guidelines of the Austrian market.

    Menü Icon Odoo 4 medical

    Odoo 4 medical

    We have expanded the open source ERP solution Odoo to include industry-relevant functions for medical supply stores, bandagists & Co.

    Menü Icon Odoo 4 logistics

    Odoo 4 logistics

    Our roots are in the transport industry. We combine all our experience from logistics and Odoo in one industry solution.

  • Odoo Insights
  • About us
    Menü Icon SUPPLiot Über uns

    About us

    Founded as a spin-off in 2019, we are fully immersed in the Odoo world. Learn more about us here.

    Menü Icon Team

    Team

    Our team consists of process understanders and digitalisers with broad economic and technical know-how.

    Menü Icon Referenzen

    References

    We can tell you a lot, but we'd rather convince you with an overview of some of our project successes.

    Menü Icon Karriere

    Career

    Become part of our team and actively contribute to the digitalisation of Austrian SMEs in varied projects.

  • Book demo
  • Jobs
    Kontakt
  • Sign in
SUPPLiot
      • Services
      • Solutions
      • Odoo Insights
      • About us
      • Book demo
      • Jobs
    • +43 (0) 1 774 03 92 - 450   hello@suppliot.eu  Jetzt kostenlose Demo sichern!
    • Follow us
      ​ ​ ​
    • Sign in
    • Kontakt

    How-to: A detailled look into recurring tasks in Odoo v16

    The technics behind the powerful Odoo-function
  • Our blog
  • How-to: A detailled look into recurring tasks in Odoo v16
  • November 14, 2023 by
    How-to: A detailled look into recurring tasks in Odoo v16
    SUPPLiot GmbH, Robert Förster

    In the dynamic realm of business management, staying organized is the key to success. For enterprises relying on Odoo v16, the introduction of recurring tasks in 2020 is a game-changer. Recurring tasks empower users to automate routine activities, ensuring that important actions are never overlooked. This feature is seamlessly integrated into the Odoo v16 platform, offering a flexible and user-friendly approach to managing ongoing responsibilities.

    ​However, the currently available documentation (see https://www.odoo.com/documentation/16.0/applications/services/project/tasks/recurring_tasks.html)) 
    only gives a broad overview to this feature and leaves out the details - like when and how exactly tasks are being created. In this blog-article, we will dive into those details for you to being able to fully understand the feature. Note that this is not an introduction to task-recurrence. For how to enable them, please see the standard Odoo documentation. 

    Behind the scenes of recurrent tasks

    When activating the recurrence at task level (open task and click on Recurrent => Recurrent), Odoo lets you select the recurrence interval. By saving this information, Odoo will not only save this information to the project.task-model but also to a newly created record of type "https://project.task.recurrence"./ From now on, this model will be the one holding all the information about your recurrence and also group all tasks together that have been created out of this recurrency. The end user will most likely never have to deal with the https://project.task.recurrence/ model directly as changes can be made in any recurrent task and will automatically be propagated to the recurrence.

    How and when are recurrent tasks actually created?

    Odoo utilizes a scheduled action to create recurring tasks. To open the scheduled action, enable developer mode in Odoo and navigate to Settings => Technical => Scheduled Actions => "Project: Create Recurring Tasks":

    Here you can enable or disable the scheduled action and also change the intervall and time that the scheduled action runs at. In our example, the scheduled action runs every day at around 4am. The scheduled action calls the function "_cron_create_recurring_tasks" of the model "task.recurrence".

    What exactly happens when _cron_create_recurring_tasks is triggered?

    As mentioned earlier, the scheduled action runs on the model "task.recurrence". When running, the action does the following:

    • It retrieves all task-recurrencies with a "next_recurrent_date" that is smaller or equal to the current date.
    • For all recurrencies found, a method called _create_next_task is called. This method actually creates the next task by retrieving the latest task of a task.recurrence and copies all the fields that are defined within the method "_get_recurring_fields()". At the time of writing, these fields are defined as follows:

    • Also, it copies all subtasks of the recurrent task. If subtasks have their own recurrency set, the recurrency will be copied, thus creating their "own life" and decoupling it of the initial subtask.
    • In addition, the task-stage is set to the first available stage within the project. If there is none available, it is set to the stage of the last task it was copied from.
    • After finishing the creation of the next task, the "next_recurrent_date" is set if:
      • there are still recurrences left
      • the current date is still smaller then the "until"-Date set in the task-recurrence-definition or it is set to "forever"

    Key takeaways of this process::

    • Recurrent tasks are not created upfront but only by the time the "next_recurrent_date" of a task.recurrence is smaller or equal to the current date.
    • All information is taken from the "last" available task (maximum database-id) within a recurrency.
    • It does not depend on any task stage (done or not) whether a new task will be created or not.
    • Even if the scheduled action will run multiple times per day, it will not affect the amount of tasks created as the "next_recurrence_date" will be set after the first creation of a task. 

    Findings we had when researching this topic:

    • When editing an existing task that has recurrence activated, it asks the user whether he would like to edit "this task", "This and following tasks" or "all tasks".
      This setting simply tells Odoo about how to handle tasks currently existant in the system. For newly created tasks, it will always take the information available in the task with the highest database-id (usually the last one created) and copy it.
    • Odoo will show an information-snippet within the task, showing the next creation-dates of the recurrency. This snippet is only valid at the time of creation of this task as it will always take the current date as the start-date for this simulation (see function _get_recurrence_start_date() within function _compute_recurrence_message()). If you open up an existing task (i.e. set with recurrency to repeat every 3 months), this information might not be correct.

    • To see exactly, when the next creation will be triggered, one must open the corresponding task.recurrence-model. Unfortunately it is not possible to do this directly from the user interface in Odoo standard. A workaround would be to set the recurrence-id-field to be visible within the task-form-view. You can do that by
      • enabling developer mode
      • navigate to the task you want to look up
      • click on the bug-icon and select "Edit view: form"
      • look for an xml-tag with the name set to "recurrence_id" and set invisible="1" to invisible="0"

      • Save and refresh the page. A link to the task.recurrency should now be visible at the top of the form view:
      • Beachten Sie, dass diese Änderung für alle Benutzer sichtbar ist, daher sollten Sie Ihre Änderung so schnell wie möglich rückgängig machen. Beachten Sie ebenfalls, dass diese Änderung nur vorübergehend ist, da wir die Ansicht nicht korrekt überschrieben haben, um update-resistent zu sein. Wenn Sie das Projektmodul aktualisieren, wird diese Änderung überschrieben.
    • When opening the recurrence, you can see the all assigned tasks and also the "next recurrence date" which lets you know when the scheduled action will create a new task again:

    Conclusio

    Recurring tasks in Odoo redefine the way businesses manage their workflows. By automating routine activities, streamlining scheduling processes, and providing insightful reporting, Odoo v16 empowers organizations to achieve unparalleled efficiency. Embrace the power of recurring tasks and elevate your business management to new heights with Odoo v16.


    ​For more details on how to leverage recurring tasks and other features in Odoo v16, consult the official documentation or get in touch with our expert team.


    Get in touch


    Please note that Odoo is a rapidly changing system with lots of improvements every day. This blog article discusses the functionality of the task-recurrency functionality as per November 2023.


    # Odoo Technical
    Equipment maintenance in Odoo
    Manage and maintain your inventory in Odoo.

    ABOUT US

    You dream it, we code it. You can always dream, but we at SUPPLiot [səˈplaɪōti] go one step further. As a trusted partner, we understand, optimize and digitalize the business processes of our clients in the SME sector.offizieller Odoo Ready Partnerin Österreich. 

    We are a part of  Logo der FÖRSTER Group

    UNSERE LÖSUNGEN

    Odoo – the modular ERP system
    Custom Development
    SUPPLiot modules for Odoo

    

     QUIC​KLI​N​KS

    Career at SUPPLiot
    Blog
    our Odoo modules

    CONTACT US

     +43 (1) 774 03 92 - 450 

      hello@suppliot.eu


    FOLLOW US

    ​  ​  ​


    •  Home 
    • •
    • Imprint
    • •
    • Privacy Policy
    • •
    • AGB 
    Copyright © SUPPLiot GmbH
    English (US) Deutsch
    Powered by Odoo - Create a free website


    Hier gibt es Cookies.

    Möchten Sie die Verwendung von Cookies für diese Website in diesem Browser zulassen?

    Wir verwenden Cookies, um Ihr Erlebnis auf dieser Website zu verbessern. Mehr dazu erfahren Sie hier.

    alle Cookies erlauben
    nur notwendige Cookies erlauben