[FIX] base: crons Work Days option
As you can see from the code, choosing "Work days" or "days" as internval has exactly the same behavior. Users might nevertheless expect the interval "work days" option to avoid running the action on non-working days, such as Saturdays and Sundays. It may have been intended, but it never worked, since revision 1: https://github.com/odoo/odoo/blob/004a0b996ff8f269451e07346f71a129a1f3fbaf/bin/addons/base/ir/ir_cron.py#L49-L50 opw-693882
This commit is contained in:
@@ -22,7 +22,6 @@ def str2tuple(s):
|
||||
return safe_eval('tuple(%s)' % (s or ''))
|
||||
|
||||
_intervalTypes = {
|
||||
'work_days': lambda interval: relativedelta(days=interval),
|
||||
'days': lambda interval: relativedelta(days=interval),
|
||||
'hours': lambda interval: relativedelta(hours=interval),
|
||||
'weeks': lambda interval: relativedelta(days=7*interval),
|
||||
@@ -49,7 +48,6 @@ class ir_cron(models.Model):
|
||||
interval_number = fields.Integer(default=1, help="Repeat every x.")
|
||||
interval_type = fields.Selection([('minutes', 'Minutes'),
|
||||
('hours', 'Hours'),
|
||||
('work_days', 'Work Days'),
|
||||
('days', 'Days'),
|
||||
('weeks', 'Weeks'),
|
||||
('months', 'Months')], string='Interval Unit', default='months')
|
||||
|
||||
Reference in New Issue
Block a user