From 7d010ee8a54e3e60324bedeba2098303b17c97ed Mon Sep 17 00:00:00 2001 From: "Anh Thao Pham (pta)" Date: Wed, 29 Jul 2020 11:29:35 +0000 Subject: [PATCH] [FIX] repair: use Customer Payment Terms in repair invoice - Install Contacts and Repairs - Go to Contacts and configure Payment Terms of Contact X (i.e. 2 Months) - Go to Repairs and create a Repair Order: * Select Contact X as Customer * Select "Before Repair" as Invoice Method * Add Parts or Operations - Confirm Repair and Create invoice The Payment Terms of the created invoice is the default one and not the Payment Terms of Customer. opw-2304818 closes odoo/odoo#55152 X-original-commit: 351718d5f579fca4945538c78e63aa50118af2b4 Signed-off-by: Nicolas Martinelli (nim) --- addons/repair/models/repair.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/repair/models/repair.py b/addons/repair/models/repair.py index 20c5a003d31..b5a6f4f75ca 100644 --- a/addons/repair/models/repair.py +++ b/addons/repair/models/repair.py @@ -347,6 +347,8 @@ class Repair(models.Model): 'invoice_line_ids': [], 'fiscal_position_id': fpos.id } + if partner_invoice.property_payment_term_id: + invoice_vals['invoice_payment_term_id'] = partner_invoice.property_payment_term_id.id current_invoices_list.append(invoice_vals) else: # if group == True: concatenate invoices by partner and currency