[FIX] stock_batch_picking: unable to vaildate batch picking
Before this - unable to validate batch picking if - any of picking from batch is manually done. Fixes-2238699 closes odoo/odoo#51791 X-original-commit: 4123809a56c0aadc752cd9a9c331cccee34c0889 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
@@ -80,7 +80,7 @@ class StockPickingBatch(models.Model):
|
||||
for batch in self:
|
||||
batch.move_ids = batch.picking_ids.move_lines
|
||||
batch.move_line_ids = batch.picking_ids.move_line_ids
|
||||
batch.show_check_availability = any(m.state != 'assigned' for m in batch.move_ids)
|
||||
batch.show_check_availability = any(m.state not in ['assigned', 'done'] for m in batch.move_ids)
|
||||
|
||||
@api.depends('picking_ids', 'picking_ids.state')
|
||||
def _compute_state(self):
|
||||
@@ -165,7 +165,7 @@ class StockPickingBatch(models.Model):
|
||||
_("Batch Transfer"),
|
||||
picking.batch_id.id,
|
||||
picking.batch_id.name))
|
||||
return self.picking_ids.button_validate()
|
||||
return pickings.button_validate()
|
||||
|
||||
def action_assign(self):
|
||||
self.ensure_one()
|
||||
|
||||
Reference in New Issue
Block a user