Retrieve all picking references related to a given source/origin sales order
I would like to know how could I get all picking references related to a given source origin sales order.
So basically I would like to retrieve in python a list of picking OUT orders (WH/OUT/...) that has a given sales order as origin (for example "SO-015" reference).
So far I am trying to include in a parser the following code:
def _get_related_picking(self, value):
stock_picking_pool = self.pool.get('stock.picking')
stock_picking_ids = stock_picking_pool.search(self.cr, self.uid, [('origin', '=', value)])
Then I register the funcion with self.localcontext.update and call it from the XML report using
But I got the following error:
QWebException: ""'NoneType' object is not callable" while evaluating
'get_related_picking(l.origin)'" while evaluating
"translate_doc(doc_id, doc_model, 'partner_id.lang', 'custom_reports.invoice_custom_document')"