Skip to content
Snippets Groups Projects
Commit 6db361bf authored by Graeme Gellatly's avatar Graeme Gellatly Committed by Martin Trigaux
Browse files

[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: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent f4bb6e5d
Branches
Tags
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment