[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.
This commit is contained in:
Goffin Simon
2016-03-15 09:11:44 +01:00
parent 9855275203
commit 3fe01ef3c3
+1 -1
View File
@@ -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):