From 6db361bf6a27f0f6bd3ec9d69c6f215e8a85086a Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Mon, 13 May 2019 13:02:06 +0000 Subject: [PATCH] [FIX] purchase: remove duplicate code Due to a forward-port, the code updating the vendor_ref has been duplicated a few lines apart. Closes odoo/odoo#33334 closes odoo/odoo#33676 Signed-off-by: Martin Trigaux (mat) --- addons/purchase/models/account_invoice.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/purchase/models/account_invoice.py b/addons/purchase/models/account_invoice.py index a6b0513bd20..e73d64b280d 100644 --- a/addons/purchase/models/account_invoice.py +++ b/addons/purchase/models/account_invoice.py @@ -103,11 +103,6 @@ class AccountInvoice(models.Model): #as there's no invoice line yet, we keep the currency of the PO self.currency_id = self.purchase_id.currency_id - vendor_ref = self.purchase_id.partner_ref - if vendor_ref: - self.reference = ", ".join([self.reference, vendor_ref]) if ( - self.reference and vendor_ref not in self.reference) else vendor_ref - new_lines = self.env['account.invoice.line'] for line in self.purchase_id.order_line - self.invoice_line_ids.mapped('purchase_line_id'): data = self._prepare_invoice_line_from_po_line(line)