From 945a94a152aacd5d1cf042916e9541bc74307ce3 Mon Sep 17 00:00:00 2001 From: Shreya Modi Date: Thu, 27 Jun 2019 05:56:37 +0000 Subject: [PATCH] [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) --- addons/sale/wizard/sale_make_invoice_advance.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 0d58cda8dd5..b612c74c835 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -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)