context: v7, Sales Order form view
We have encountered a few situations where a user:
1) accidentally clicked 'Cancel Order' button on a Sales Order in 'progress' / 'manual' state, resulting in the Sales Order being advanced through the workflow into 'cancel' state.
2) mistakenly clicked 'Ignore Exception' button on a Sales Order in 'except' state, resulting in the Sales Order being advanced through the workflow into 'done' state.
Since, in realities, these are Confirmed Sales Orders with valid completed/active order lines, we want to revive their states back into their respective original states rather than making a copy as a new Quotation.
Can anyone suggest on how to go about doing that? We have had a few-months-worth-of implementing our own addons modules to augment/modify openerp modules such as sale, project, res.partner, etc., so please feel free to get into technical / coding details.
Thank you.
PS. Moving forward, we'll be enabling the 'confirm' option on most risky buttons as suggested in help.openerp.com/question/8623/warn-user-before-cancelling-a-quotation/