summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorqdp-odoo <qdp@openerp.com>2014-07-23 09:48:05 +0200
committerDenis Ledoux <dle@odoo.com>2014-07-23 10:28:26 +0200
commite7780ac97a6a45dcf295d4aa86509b00efdf618d (patch)
treed67ed479364abde8cd8d68778fe5c3ea01b1cb5c /addons
parent36fcfc66c40a930c8dcc91b3172803b07c6ec195 (diff)
[FIX] stock: wrong target table and function for lot_ids in stock.move
Diffstat (limited to 'addons')
-rw-r--r--addons/stock/stock.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index be91edd3ed3..6b8a7c493e1 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1526,9 +1526,9 @@ class stock_move(osv.osv):
res = dict.fromkeys(ids, False)
for move in self.browse(cr, uid, ids, context=context):
if move.state == 'done':
- res[move.id] = [q.id for q in move.quant_ids]
+ res[move.id] = [q.lot_id.id for q in move.quant_ids if q.lot_id]
else:
- res[move.id] = [q.id for q in move.reserved_quant_ids]
+ res[move.id] = [q.lot_id.id for q in move.reserved_quant_ids if q.lot_id]
return res
def _get_product_availability(self, cr, uid, ids, field_name, args, context=None):
@@ -1683,7 +1683,7 @@ class stock_move(osv.osv):
'propagate': fields.boolean('Propagate cancel and split', help='If checked, when this move is cancelled, cancel the linked move too'),
'picking_type_id': fields.many2one('stock.picking.type', 'Picking Type'),
'inventory_id': fields.many2one('stock.inventory', 'Inventory'),
- 'lot_ids': fields.function(_get_lot_ids, type='many2many', relation='stock.quant', string='Lots'),
+ 'lot_ids': fields.function(_get_lot_ids, type='many2many', relation='stock.production.lot', string='Lots'),
'origin_returned_move_id': fields.many2one('stock.move', 'Origin return move', help='move that created the return move'),
'returned_move_ids': fields.one2many('stock.move', 'origin_returned_move_id', 'All returned moves', help='Optional: all returned moves created from this move'),
'reserved_availability': fields.function(_get_reserved_availability, type='float', string='Quantity Reserved', readonly=True, help='Quantity that has already been reserved for this move'),