From 3fe01ef3c3adb0b0095759340bb80dba0427f4de Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 14 Mar 2016 17:09:13 +0100 Subject: [PATCH] [FIX] purchase: type of a related field The type of the related field purchase_id is many2one. With the type the function _related_read in fields.py can convert the record "purchase.order" in id. --- addons/purchase/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index b0486950f26..3f8faa53d3c 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -9,7 +9,7 @@ class stock_picking(osv.osv): _inherit = 'stock.picking' _columns = { 'purchase_id': fields.related('move_lines', 'purchase_line_id', 'order_id', string="Purchase Orders", - readonly=True, relation="many2one"), + readonly=True, type="many2one", relation="purchase.order"), } def _prepare_values_extra_move(self, cr, uid, op, product, remaining_qty, context=None):