~camptocamp/openobject-addons/6.1-c2c-official

« back to all changes in this revision

Viewing changes to stock/wizard/stock_return_picking.py

  • Committer: alexandre.fayolle at camptocamp
  • Date: 2014-05-06 08:24:10 UTC
  • mfrom: (6640.1.1 addons)
  • Revision ID: alexandre.fayolle@camptocamp.com-20140506082410-53oov6c5jdczrco5
[MRG] upstream fixing view after using stock_return_picking wizard 

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
        pick_obj.force_assign(cr, uid, [new_picking], context)
203
203
        # Update view id in context, lp:702939
204
204
        view_list = {
205
 
                'out': 'view_picking_out_tree',
206
 
                'in': 'view_picking_in_tree',
207
 
                'internal': 'vpicktree',
208
 
            }
209
 
        data_obj = self.pool.get('ir.model.data')
210
 
        res = data_obj.get_object_reference(cr, uid, 'stock', view_list.get(new_type, 'vpicktree'))
211
 
        context.update({'view_id': res and res[1] or False})
212
 
        return {
213
 
            'domain': "[('id', 'in', ["+str(new_picking)+"])]",
214
 
            'name': 'Picking List',
215
 
            'view_type':'form',
216
 
            'view_mode':'tree,form',
217
 
            'res_model':'stock.picking',
218
 
            'type':'ir.actions.act_window',
219
 
            'context':context,
 
205
            'out': 'action_picking_tree',
 
206
            'in': 'action_picking_tree4',
 
207
            'internal': 'action_picking_tree6',
220
208
        }
221
 
 
 
209
        data_pool = self.pool.get('ir.model.data')
 
210
        action = {}
 
211
        action_model,action_id = data_pool.get_object_reference(cr, uid, 'stock', view_list.get(new_type,'action_picking_tree6'))
 
212
        if action_model:
 
213
            action_pool = self.pool.get(action_model)
 
214
            action = action_pool.read(cr, uid, action_id, context=context)
 
215
            action['domain'] = "[('id','=', "+str(new_picking)+")]"
 
216
            action['context'] = context
 
217
        return action
222
218
stock_return_picking()
223
219
 
224
220
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: