Change of workflow activity when the object is modified
I need to build a workflow, bound to one OSV object (a sale order). The workflow should automatically change its activity when the object is modified.
For instance, when the order is considered as 'paid' (the order ammount is equal to the sum of the payments for this order), the workflow activity should change from 'open' to 'paid'.
Obviously this is possible using the workflow system. A transition between the 'open' activity and 'paid' activity has no signal, only a condition:
<field name="condition
'paid' is a method of the 'oder' object, which returns True or False whether the order is paid.
However, the condition doesn't seem to be tested. I tried to write in the order object (passing to the 'write' method an empty dictionary) but the order stay in its 'open' activity.
How could I perform this automatic check?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Vincent Le Goff
- Solved:
- Last query:
- Last reply: