]
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):