[IMP] stock: WIP packaging
bzr revid: qdp-launchpad@openerp.com-20130627104255-gwhfgmbo41whphht
This commit is contained in:
parent
e260433095
commit
1e8f7923f1
|
@ -1601,11 +1601,19 @@ class stock_picking(osv.osv):
|
|||
'stock', self._VIEW_LIST.get(type, 'view_picking_form'))
|
||||
return res and res[1] or False
|
||||
|
||||
def _get_picking_for_packing_ui(self, cr, uid, context=None):
|
||||
return self.search(cr, uid, [('state', '=', 'assigned')], limit=1, context=context)[0]
|
||||
|
||||
def action_done_from_packing_ui(self, cr, uid, picking_id, context=None):
|
||||
#fill all the packages with assigned operations
|
||||
#call action_done of picking
|
||||
for operation in self.browse(cr, uid, picking_id, context=context).pack_operation_ids:
|
||||
#pack existing packs
|
||||
if operation.package_id and operation.result_package_id:
|
||||
self.pool.get('stock.quant.package').write(cr, uid, operation.package_id.id, {'parent_id': operation.result_package_id.id}, context=context)
|
||||
#don't call action_done of picking because it will make all moves don, but make a partial delivery
|
||||
#self.action_done(cr, uid, picking_id, context=context)
|
||||
#return id of next picking to work on
|
||||
pass
|
||||
return self._get_picking_for_packing_ui(cr, uid, context=context)
|
||||
|
||||
def action_pack(self, cr, uid, picking_id, context=None):
|
||||
stock_operation_obj = self.pool.get('stock.pack.operation')
|
||||
|
|
Loading…
Reference in New Issue