Skip to Content
मेन्यू
This question has been flagged

Hello Odooers, 


I have a task that i really would appreciate some help with and the solution would be very useful to me. I hope someone can bear reading all the way. Thanks in advance.


I am using Odoo 14, the community edition and i need to create a scheduled action that runs once a week (every Sunday) to check the plan for upcoming week.  

The action should check if the field planned_hours sum up to, lets say 4 hours each workday (Mon-Fri) with a weekly sum of approx. 20 hours. The date field used for this is x_exec_date.

The action should then run this check for each assigned user. 

If the conditions are not met the next step is to find the next assigned activity and update the date in x_exec_date to a date in the upcoming week. The goal is to sum up 4 hours planned time each day.


  • Run once a week
  • Check the plan for next week
  • Check x_exec_date - weekly sum of planned hours
  • Check x_exec_date -monday
  • Find next assigned task - update x_exec_date with mondays date.
  • Check Check x_exec_date -monday
  • Find next assigned task - add to monday by fill x_exec_date
  • Check Check x_exec_date -monday >4
  • Ok
  • Check week - not 20 
  • and so on until the week has 20 hours of planned time. If it is not exactly 20 hours that is fine. But the action should stop when 20+ is true.

Many thanks for your time!

//Peter

Avatar
Discard
Related Posts Replies Views Activity
1
नव॰ 23
9995
3
नव॰ 20
9388
5
नव॰ 22
3854
1
मई 22
4575
0
मार्च 22
2980