Hi everyone,
I use a workflow and when I am in a particular state, I want to go back to the initial state of the workflow and reiterate the workflow steps but when I go back to the initial state, my workflow does nothing.
can someone help me please
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi everyone,
I use a workflow and when I am in a particular state, I want to go back to the initial state of the workflow and reiterate the workflow steps but when I go back to the initial state, my workflow does nothing.
can someone help me please
You could do it like this for Odoo v10:
records = self.env['your_model'].browse(ids)
records.delete_workflow()
records.create_workflow()
records.signal_workflow('signal1')
records.signal_workflow('signal2')
records.signal_workflow('signaln')
Hope this helps
Axel,
In which case we use signal_workflow('signal1') ?
signal_workflow is the way the workflow could trigger transitions by code, in the workflow definition you could see that activity states are tagged by a signal name and the transitions define the signal connector from an activity state to another
check that you marked as accepted your answer wish is incomplete related to the question and just a part of mine. That could confuse others users in the future
Oh yes of course :p
thank you
Thank you so so so much !
I change a little your code, it's work now :)
self.delete_workflow()
self.create_workflow()
it's the same, self in your case is the recordset that I put as records
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Dec 24
|
51 | ||
|
0
Dec 23
|
300 | ||
|
1
Mar 24
|
490 | ||
|
1
Aug 23
|
1375 | ||
|
1
May 19
|
2229 |