Skip to content

Commit

Permalink
Add support for settled, rejected instead of done/canceled... quite ugly
Browse files Browse the repository at this point in the history
  • Loading branch information
llacroix committed Nov 21, 2014
1 parent ccc1d3e commit fe04561
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mgmtsystem_nonconformity/mgmtsystem_nonconformity.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ def wkf_cancel(self, cr, uid, ids, context=None):
def wkf_close(self, cr, uid, ids, context=None):
"""Change state from in progress to closed"""
o = self.browse(cr, uid, ids, context=context)[0]
done_states = ['done', 'cancelled']
# TODO make it more friendly
done_states = ['done', 'cancelled', 'settled', 'rejected']
if (o.immediate_action_id
and o.immediate_action_id.stage_id.name.lower() not in done_states):
raise orm.except_orm(
Expand Down

0 comments on commit fe04561

Please sign in to comment.