~vauxoo/addons-vauxoo/6.0-trunk

« back to all changes in this revision

Viewing changes to stock_move_entries/model/stock_move_entries.py

  • Committer: Jose Morales
  • Date: 2014-07-28 20:00:11 UTC
  • mfrom: (543.7.551 7.0-addons-vauxoo)
  • Revision ID: jose@vauxoo.com-20140728200011-csytovehrzwp24lr
[FORWARD PORT] 7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
    _columns = {
37
37
        'sm_id': fields.many2one('stock.move', 'Stock move ID'),
38
 
        'location_id': fields.many2one('stock.location', 'Location Move',
39
 
                                       help="Location Move Source"),
40
 
        'location_dest_id': fields.many2one('stock.location', 'Location Move',
41
 
                                            help="Location Move Destination")
 
38
        'location_id':fields.related('sm_id', 'location_id', 'Source Location',
 
39
            relation='stock.location', store=True, help='Location Move Source'), 
 
40
        'location_dest_id':fields.related('sm_id', 'location_dest_id',
 
41
            'Destination Location', relation='stock.location', store=True,
 
42
            help="Location Move Destination")
42
43
    }
43
44
 
44
45
 
108
109
                                      context=context)
109
110
        for line in res:
110
111
            line[2]['sm_id'] = move.id
111
 
            line[2]['location_id'] = move.location_id.id
112
 
            line[2]['location_dest_id'] = move.location_dest_id.id
113
112
        return res