Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get the invoice associate with the picking of invoice in OpenERP/Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 334
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: