From 7ac9dc20c11367b565109e0221af2eacf91db9a5 Mon Sep 17 00:00:00 2001 From: "Laurent Mignon (ACSONE)" Date: Wed, 24 Jul 2024 14:21:39 +0200 Subject: [PATCH] [IMP] stock_move_location: 'Move from location' button also on outgoring picking type --- stock_move_location/readme/USAGE.md | 50 ++++++++----------- .../views/stock_picking_type_views.xml | 2 +- .../wizard/stock_move_location.py | 2 +- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/stock_move_location/readme/USAGE.md b/stock_move_location/readme/USAGE.md index a772a0a56..a61d944cb 100644 --- a/stock_move_location/readme/USAGE.md +++ b/stock_move_location/readme/USAGE.md @@ -1,43 +1,37 @@ -- A new menu item Operations \> Move from location... opens a wizard - where 2 locations can be specified. -- Select origin and destination locations and press "IMMEDIATE TRANSFER" - or "PLANNED TRANSFER" +- A new menu item Operations \> Move from location... opens a wizard where 2 locations + can be specified. +- Select origin and destination locations and press "IMMEDIATE TRANSFER" or "PLANNED + TRANSFER" - Press ADD ALL button to add all products available -- Those lines can be edited. Move quantity can't be more than a max - available quantity +- Those lines can be edited. Move quantity can't be more than a max available quantity - Move doesn't care about the reservations and will move stuff anyway -- If during your operation with the wizard the real quantity will change - it will move only the available quantity at the button press -- Products will be moved and a form view of picking that did that will - show up -- If "PLANNED TRANSFER" is used - the picking won't be validated - automatically +- If during your operation with the wizard the real quantity will change it will move + only the available quantity at the button press +- Products will be moved and a form view of picking that did that will show up +- If "PLANNED TRANSFER" is used - the picking won't be validated automatically If you want to transfer a full quant: -- Go to Inventory \> Products \> Products and click "On hand" smart - button or Inventory \> Reporting \> Inventory, the quants view will be - opened. +- Go to Inventory \> Products \> Products and click "On hand" smart button or Inventory + \> Reporting \> Inventory, the quants view will be opened. - Select the quantities which you want move to another location -If you go to the Inventory Dashboard you can see the button "Move from -location" in each of the picking types (only applicable to internal -transfers). Press it and you will be directed to the wizard. +If you go to the Inventory Dashboard you can see the button "Move from location" in each +of the picking types (only applicable to internal and outgoing transfers). Press it and +you will be directed to the wizard. ![](https://user-images.githubusercontent.com/147538094/281480833-208ea309-0bad-43e7-bd6f-8384520afe00.png) -To enable this option, check "Show Move On Hand Stock" in the Picking Type configuration. +To enable this option, check "Show Move On Hand Stock" in the Picking Type +configuration. ![](https://user-images.githubusercontent.com/147538094/281479487-45fa4bde-36be-4ba1-8d54-8e707b89459e.png) If you want transfer everything from stock.location -On a draft picking, add a button to fill with moves lines for all -products in the source destination. This allows to create a picking to -move all the content of a location. The Origin Location must have stock. -The Destination Location has to be a final location. -If some quants are not available -(i.e. reserved) the picking will be in partially available state and -reserved moves won't be listed in the operations. Use barcode interface -to scan a location and create an empty picking. Then use the fill with -stock button. +On a draft picking, add a button to fill with moves lines for all products in the source +destination. This allows to create a picking to move all the content of a location. The +Origin Location must have stock. The Destination Location has to be a final location. If +some quants are not available (i.e. reserved) the picking will be in partially available +state and reserved moves won't be listed in the operations. Use barcode interface to +scan a location and create an empty picking. Then use the fill with stock button. diff --git a/stock_move_location/views/stock_picking_type_views.xml b/stock_move_location/views/stock_picking_type_views.xml index ed0a6d6db..1f3045b74 100644 --- a/stock_move_location/views/stock_picking_type_views.xml +++ b/stock_move_location/views/stock_picking_type_views.xml @@ -8,7 +8,7 @@ diff --git a/stock_move_location/wizard/stock_move_location.py b/stock_move_location/wizard/stock_move_location.py index b65151680..23a18a419 100644 --- a/stock_move_location/wizard/stock_move_location.py +++ b/stock_move_location/wizard/stock_move_location.py @@ -71,7 +71,7 @@ class StockMoveLocationWizard(models.TransientModel): for rec in self: picking_type = self.env["stock.picking.type"] base_domain = [ - ("code", "=", "internal"), + ("code", "in", ("internal", "outgoing")), ("warehouse_id.company_id", "=", company_id), ] if rec.origin_location_id: