server action not executed on wkf activity with kind=flowstop
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP's Framework R&D |
Bug Description
I am trying to send a mail when a holiday request is confirmed/
It works well when the holiday request is confirmed and accepted, but it doesn't work when the holiday request is refused.
After some investigation, I found out that :
In addons-
the workflow activity "refuse" is of kind 'stopall' (is was not the case in OpenERP 5.0 ; it is the case since OpenERP 6.0)
In server-
when kind == 'stopall', it doesn't consider the 'action_id' of the workflow activity.
Instead, if you look line 99, when kind == 'dummy' or 'function', you see this code which executes the server action :
if activity[
res2 = wkf_expr.
if res2:
result=res2
So, what is the good solution if I want to send an email when a holiday request is refused ?
1) in addons/hr_holidays, modify the kind of the workflow activity "refuse" from "stopall" to "dummy" ?
2) patch the server to execute the server action on an activity with kind = flowstop ?
All suggestions are welcomed !
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Low |
status: | New → Confirmed |