[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) <mat@odoo.com>
This commit is contained in:
committed by
Martin Trigaux
parent
f4bb6e5d34
commit
6db361bf6a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user