Skip to content

Commit

Permalink
[FIX] order line write executed only if self.env.context.get('new_sal…
Browse files Browse the repository at this point in the history
…e_revision')
  • Loading branch information
JuaniFreedoo committed Jul 22, 2017
1 parent 632ad30 commit 79161e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sale_order_revision/model/sale_order.py
Expand Up @@ -91,7 +91,8 @@ def copy(self, default=None):
'unrevisioned_name': self.unrevisioned_name,
})
prev_order = super(sale_order, self).copy(default=default)
prev_order.order_line.write({'state': 'cancel'})
if self.env.context.get('new_sale_revision'):
prev_order.order_line.write({'state': 'cancel'})
return prev_order

@api.model
Expand Down

0 comments on commit 79161e6

Please sign in to comment.