Skip to content

Commit

Permalink
Merge pull request #159 from oihane/8.0-back2draft
Browse files Browse the repository at this point in the history
[FIX] <sale_order_back2draft>
  • Loading branch information
pedrobaeza committed May 25, 2015
2 parents 956a595 + 920b170 commit 3639077
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sale_order_back2draft/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def button_draft(self):
_("You can't back any order that it's not on cancel "
"state. Order: %s" % order.name))
order.order_line.write({'state': 'draft'})
order.procurement_group_id.unlink()
for line in order.order_line:
line.procurement_ids.unlink()
order.write({'state': 'draft'})
order.delete_workflow()
order.create_workflow()
Expand Down

0 comments on commit 3639077

Please sign in to comment.