[FIX] stock: Alert should disappear when picking done cancelled
In this commit, added a restriction on "json_popover" field so, Alert should disappear when picking is done or cancelled state on list, kanban and form views. task-2178494 X-original-commit: 12ada1bfa3e85c636f5ea85af675dedad3e7e0e4
This commit is contained in:
committed by
Rémy Voet (ryv)
parent
f56c74c434
commit
67402bc5ec
@@ -1281,7 +1281,7 @@ class StockMove(models.Model):
|
||||
if all(state in ('done', 'cancel') for state in siblings_states):
|
||||
move.move_dest_ids.write({'procure_method': 'make_to_stock'})
|
||||
move.move_dest_ids.write({'move_orig_ids': [(3, move.id, 0)]})
|
||||
self.write({'state': 'cancel', 'move_orig_ids': [(5, 0, 0)]})
|
||||
self.write({'state': 'cancel', 'move_orig_ids': [(5, 0, 0)], 'delay_alert_date': False})
|
||||
return True
|
||||
|
||||
def _prepare_extra_move_vals(self, qty):
|
||||
@@ -1395,7 +1395,7 @@ class StockMove(models.Model):
|
||||
if len(result_package.quant_ids.filtered(lambda q: not float_is_zero(abs(q.quantity) + abs(q.reserved_quantity), precision_rounding=q.product_uom_id.rounding)).mapped('location_id')) > 1:
|
||||
raise UserError(_('You cannot move the same package content more than once in the same transfer or split the same package into two location.'))
|
||||
picking = moves_todo.mapped('picking_id')
|
||||
moves_todo.write({'state': 'done', 'date': fields.Datetime.now()})
|
||||
moves_todo.write({'state': 'done', 'date': fields.Datetime.now(), 'delay_alert_date': False})
|
||||
|
||||
move_dests_per_company = defaultdict(lambda: self.env['stock.move'])
|
||||
for move_dest in moves_todo.move_dest_ids:
|
||||
|
||||
Reference in New Issue
Block a user