[FIX] purchase: refresh on shipments action button
When opening a purchase order shipments using the given smart button, and attempting a refresh, it leaded to a "record has been deleted" error, because the current `active_id` is a purchase.order id, while the `active_id` in the window action `action_picking_tree` context expects a picking type id. The purpose of using `action_picking_tree` was to use it as a template instead of having to create a full action dict, not to actually use it. By removing the id from the action dict, we prevent to re-use the action window `action_picking_tree` on refresh. opw-706933
This commit is contained in:
@@ -398,6 +398,7 @@ class PurchaseOrder(models.Model):
|
||||
result = action.read()[0]
|
||||
|
||||
#override the context to get rid of the default filtering on picking type
|
||||
result.pop('id', None)
|
||||
result['context'] = {}
|
||||
pick_ids = sum([order.picking_ids.ids for order in self], [])
|
||||
#choose the view_mode accordingly
|
||||
|
||||
Reference in New Issue
Block a user