Step-1 Go to picking_invoice_relation module.
Step-2 invoice->invoice.py.
Step-3 After that used below code in invoice.py file.
if not isinstance(ids, types.ListType): # Ensure it is a list before proceeding.
ids = [ids]
for invoice_id in ids:
invoice = self.browse(cr, uid, invoice_id)
if not invoice.invoice_id_ref:
if invoice.picking_ids and invoice.picking_ids[0]:
if invoice.picking_ids[0].picking_id_ref:
if invoice.picking_ids[0].picking_id_ref.invoice_ids and invoice.picking_ids[0].picking_id_ref.invoice_ids[0]:
invoice_id_ref = invoice.picking_ids[0].picking_id_ref.invoice_ids[0].id
0 Comment(s)