[IMP]include origin when searching invoices

This commit is contained in:
aaron
2018-05-25 16:35:26 +02:00
committed by Aaron Henriquez
parent a04d97715c
commit 68e2cdb338

View File

@@ -78,12 +78,15 @@ class AccountInvoiceLine(models.Model):
if self.env.context.get('rma'):
for inv in self:
if inv.invoice_id.reference:
res.append((inv.id, "%s %s %s qty:%s" % (
inv.invoice_id.number, inv.invoice_id.reference,
res.append((inv.id, "%s %s %s %s qty:%s" % (
inv.invoice_id.number or '',
inv.origin or '',
inv.invoice_id.reference or "",
inv.product_id.name, inv.quantity)))
elif inv.invoice_id.number:
res.append((inv.id, "%s %s qty:%s" % (
res.append((inv.id, "%s %s %s qty:%s" % (
inv.invoice_id.number or '',
inv.origin or '',
inv.product_id.name, inv.quantity)))
else:
res.append(super(AccountInvoiceLine, inv).name_get()[0])