Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def action_assign(self, cr, uid, ids, *args):
- """ Changes state of picking to available if all moves are confirmed.
- @return: True
- """
- for pick in self.browse(cr, uid, ids):
- move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed']
- if not move_ids:
- raise osv.except_osv(_('Warning !'),_('Not enough stock, unable to reserve the products.'))
- self.pool.get('stock.move').action_assign(cr, uid, move_ids)
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement