Weekday-Only Task Due Dates: Summary and Testing Guide

Weekday-Only Task Due Dates: Summary and Testing Guide

What we did

Tasks in Odoo can no longer be due on a Saturday or Sunday.

  • Automatic tasks (from Rx status changes, follow-up cycles, account status alerts, check-ins, and every other automated source) that would have been due on a weekend are now due the following Monday.
  • Tasks created by hand can't be saved with a weekend due date. As soon as you pick a Saturday or Sunday in the Schedule Activity popup or the Rx "Create Tasks" action, a warning appears, and the task won't save until you choose a weekday.
  • Pre-filled due dates in the Schedule Activity popup never land on a weekend. If an activity type's default delay would fall on a Saturday or Sunday, the popup suggests the following Monday instead.

A few things to know:

  • This applies going forward only. Any open tasks already due on a weekend stay as they are.
  • In the Schedule Activity popup, selecting a Status used to throw away the due date you picked and replace it with the activity type's default. It now keeps the date you choose.
  • Company holidays are not skipped, only Saturdays and Sundays.

How to test

Test 1: Automatic tasks move to Monday

  1. Open Rx Stages and pick a stage with Task to Generate checked.
  2. Note its Due Days, then temporarily change it so the due date would land on a weekend. For example, on a Friday, set it to 1.
  3. Open a test Rx that has the owner the stage assigns tasks to (MSC Owner or Account Owner), and move it into that stage.
  4. The new task should be due the following Monday, not on the weekend.
  5. Set the stage's Due Days back to its original value.

Test 2: Weekend dates are blocked when scheduling from an Rx

  1. On any Rx, click Activities.
  2. Pick a Saturday as the due date. A warning should appear right away.
  3. Click Schedule anyway. You should get an error saying due dates must fall on a weekday. After closing it, the Schedule button should still be there.
  4. Change the date to a weekday and schedule. It should save normally.

Test 3: Weekend dates are blocked in "Create Tasks"

  1. On an Rx, open the Actions (gear) menu and choose Create Tasks.
  2. Pick a Saturday or Sunday. You should see the same warning and be unable to save.
  3. Change to a weekday and confirm it saves.

Test 4: Pre-filled dates skip the weekend

  1. Go to Settings > Technical > Discuss > Activity Types, open To-Do, note its default delay, and temporarily change it so it would land on a weekend (for example, 1 day when testing on a Friday).
  2. On an Rx, click Activities and choose To-Do. The pre-filled due date should be the following Monday.
  3. Set the To-Do delay back to its original value.

Test 5: Your chosen date is kept when a Status is selected

  1. On an Rx, click Activities, choose To-Do, and select any Status other than Completed.
  2. Pick a weekday a few days out and click Schedule.
  3. The task should be due on exactly the date you picked.

If all five tests pass, the change is working as intended.