base.action.rule is repeated ignoring the date it was last run
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Medium
|
OpenERP R&D Addons Team 1 | |||
OpenERP Community Backports (Addons) | Status tracked in 7.0 | |||||
7.0 |
New
|
Undecided
|
Unassigned |
Bug Description
This is related to:
http://
If you look at the code here:
http://
if last_run and (last_run <= action_dt < now) or (action_dt < now):
you see a misuse of the python and-or trick. What happens in that specific case is that when (last_run <= action_dt < now) is False, then Python checks (action_dt < now) which can easily be True.
I think this can be fixed using the inline if-else instead of the and-or trick.
The bug seems to have been introduced just before releasing 7.0:
http://
Thanks!
Related branches
- Lorenzo Battistini (community): Abstain
- Leonardo Pistone (community): Abstain
- Alexandre Fayolle - camptocamp (community): Abstain
- OpenERP Core Team: Pending requested
-
Diff: 13 lines (+2/-1)1 file modifiedbase_action_rule/base_action_rule.py (+2/-1)
- Leonardo Pistone (community): Approve (code review)
- OpenERP Core Team: Pending requested
-
Diff: 17 lines (+6/-1)1 file modifiedbase_action_rule/base_action_rule.py (+6/-1)
- Yann Papouin: Approve (code review)
- Leonardo Pistone: Approve (code review)
- Holger Brunn (Therp): Approve (code review)
- Pedro Manuel Baeza: Approve (code review)
-
Diff: 17 lines (+6/-1)1 file modifiedbase_action_rule/base_action_rule.py (+6/-1)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1) |
importance: | Undecided → Medium |
status: | New → Confirmed |