summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnh Thao Pham (pta) <pta@odoo.com>2020-07-29 11:29:35 +0000
committerAnh Thao Pham (pta) <pta@odoo.com>2020-07-29 14:30:21 +0000
commit7d010ee8a54e3e60324bedeba2098303b17c97ed (patch)
tree1b87d089d359f7ed1f77ad9c70725c4caa53c29c
parent99c02a83a53b7fc9b00bc34fc083169793bd5b3c (diff)
[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) <nim@odoo.com>
-rw-r--r--addons/repair/models/repair.py2
1 files changed, 2 insertions, 0 deletions
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