[MERGE] docstrings from numerigraphe
authorFabien Pinckaers <fp@tinyerp.com>
Sat, 29 Sep 2012 10:40:19 +0000 (12:40 +0200)
committerFabien Pinckaers <fp@tinyerp.com>
Sat, 29 Sep 2012 10:40:19 +0000 (12:40 +0200)
bzr revid: fp@tinyerp.com-20120929104019-pvnf5eonwp2t5fpr

1  2 
addons/stock/stock.py

@@@ -677,21 -669,22 +677,22 @@@ class stock_picking(osv.osv)
      ]
  
      def action_process(self, cr, uid, ids, context=None):
 +        if context is None:
 +            context = {}
+         """Open the partial picking wizard"""
 -        if context is None: context = {}
 -        context = dict(context, active_ids=ids, active_model=self._name)
 -        partial_id = self.pool.get("stock.partial.picking").create(cr, uid, {}, context=context)
 +        context.update({
 +            'active_model': self._name,
 +            'active_ids': ids,
 +            'active_id': len(ids) and ids[0] or False
 +        })
          return {
 -            'name':_("Products to Process"),
 -            'view_mode': 'form',
 -            'view_id': False,
              'view_type': 'form',
 +            'view_mode': 'form',
              'res_model': 'stock.partial.picking',
 -            'res_id': partial_id,
              'type': 'ir.actions.act_window',
 -            'nodestroy': True,
              'target': 'new',
 -            'domain': '[]',
              'context': context,
 +            'nodestroy': True,
          }
  
      def copy(self, cr, uid, id, default=None, context=None):