[FIX] sale: show down payment at the end of sale order

Purpose of the commit is if sales order is very long, the down payment
gets lost in the middle of it and will be best to make it appear
systematically at the end of it.

currently the sales order line is order by the sequence and while
creating the down payment it takes the default sequence of the line
so adding sequence by +1 will show the down payment at the end.

task-2025709

closes odoo/odoo#34404

Closes: #34404
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
This commit is contained in:
Shreya Modi
2019-11-04 13:22:15 +00:00
committed by Damien Bouvy
parent 65edd6c55e
commit 945a94a152
@@ -156,6 +156,7 @@ class SaleAdvancePaymentInv(models.TransientModel):
'analytic_tag_ids': analytic_tag_ids,
'tax_id': [(6, 0, tax_ids)],
'is_downpayment': True,
'sequence': order.order_line[-1].sequence + 1
})
del context
self._create_invoice(order, so_line, amount)