Browse Source

Merge PR #509 into 12.0

Signed-off-by legalsylvain
pull/511/head
OCA-git-bot 4 years ago
parent
commit
90035c6316
  1. 4
      pos_order_return/models/pos_order.py

4
pos_order_return/models/pos_order.py

@ -72,13 +72,15 @@ class PosOrder(models.Model):
for line in self.lines: for line in self.lines:
qty = - line.max_returnable_qty([]) qty = - line.max_returnable_qty([])
if qty != 0: if qty != 0:
line.copy(
copy_line = line.copy(
{ {
'order_id': new_order.id, 'order_id': new_order.id,
'returned_line_id': line.id, 'returned_line_id': line.id,
'qty': qty, 'qty': qty,
} }
) )
copy_line._onchange_amount_line_all()
new_order._onchange_amount_all()
return res return res
def partial_refund(self, partial_return_wizard): def partial_refund(self, partial_return_wizard):

Loading…
Cancel
Save