Skip to Content
Menu
This question has been flagged
2 Replies
2561 Views

Hi,

I am using odoo 14. Our delivery operation involves 2 steps. 

Step 1: The products are physically delivered from our warehouse to the customers.

Step 2: When receiving our delivery, the customer may choose to accept all qty or reject some qty because of damage, short shelf life, etc... So the undelivered products will be returned back to our warehouse and add back to our inventory.

The odoo 2-steps seems to fit our need but not 100%. For the returned qty (undelivered qty), they are still left in WH/Output and does not add back to WH/Stock.

Can someone tell me how I can customize the code to add back the undelivered qty to WH/Stock???

Also, we usually have to wait 1-2 days before knowing whether there are any returned items from the customer. In the meantime, other SOs are being created and delivered. I want to let the user see the exact quantity of a product lot physically in our warehouse, i.e in WH/Stock in the following format "lotABC[200]" where [200] is the qty of the lot in WH/Stock. I customize the name_get method as followed:

def name_get(self):
    res = []
    for lot in self:
        if lot.name:
            display_value = lot.name
            display_value += ' [' display_value += '%.0f ' % lot.product_qty
            display_value += lot.product_uom_id.name
            display_value += ']'
            res.append((lot.id, display_value))
    return res 

But it always show WH/Stock+WH/Output and not just the qty in WH/Stock. How can I correct that? Please advise.

Regards,
Simon Lee

Avatar
Discard
Best Answer

Hi Simon,

Maybe you need to change location, route and/ or also create a separate operation for returns (undelivered qty). Currently you seems to have the return location set to WH/Output.

Default Odoo is  - Receive in 1 Step - Pull from partner location/vendor destination WH/Stock with receipt as operation type.

The return route is usually triggered by clicking "return" on the relevant delivery order with status as 'done'

Hope this helps

Avatar
Discard

Thats right! you don't need to code.

Author Best Answer

Thank you for your reply. Can I use different routes for goods receipt and returning of undelivered goods??? When we receive goods from PO, the goods go direct from Partner Location/Customer to WH/Stock. For the undelivered goods in a Delivery Order, the goods go from WH/Output to WH/Stock.

Can you show me how to set it up? Thanks.

Simon

Avatar
Discard

Hi Simon,

As default the route for 'return' would be partner location to Stock and operation is 'Receipt'. You can validate by checking if the field "Operation Type for Returns" is set for 'Delivery Orders' on Receipt operations. Inventory App Config > Operation Type and select 'Receipts'

To understand your use case better, when you mean return/ undelivered, do you mean "Return" button is clicked on 'Done' delivery order to generate return or do you mean "picking" operation is 'done', but the product wasn't shipped. (Delivery order was validated without including the product and no back-order created)?

For the 2nd scenario (product was moved physically from Stock location to Output location), you would need to create return on "Pick" operation or create internal transfer operation to move product back to its storage location.

If you are looking to create a new operation type for returns, you can check this post

https://www.odoo.com/forum/help-1/inventory-routes-returns-188066

Author

Hi Jaideep,

I should below to the 2nd scenario as you described. I tried your idea but the result was not correct.

Here's the setting:

a) Inventory>Configuration>Warehouse>Outgoing Shipments>Outgoing Shipments: 2 steps

b) Create a new Operation Types with the following settings:

Operating Type: Return undelivered products

Code: DO_RET

Type of Operation: Internal Transfer

Operation Type for Returns:

Default Source Location: WH/Output

Default Dest Location: WH/Stock

c) Set the "Operation Type For Return" For "PICK" to the Operation Types in step b. Here's the setting for "PICK"

Operation Type: Pick

Code: PICK

Type of Operation: Internal Transfer

Operation Type for Returns: Return undelivered products

Default Source Location: WH/Output

Default Dest Location: Partner Locations/Customers

=========

Here's what I did. I then deliver 10pcs of ABC to a customer. But the customer only accepts 8pcs so 2pcs will be add back to the inventory.

I have a product ABC with qty of 60pcs in WH/Stock. WH/Output is empty.

1) I created a SO 00008 for ABC with qty 10pcs. Saved the SO and "Confirm" the SO.

2) I then select WH/PICK/00008, click "Check Availability", enter Done = 10, click "Validate"

3) I then select the other delivery WH/OUT/00012 for the 2 steps process, enter Done=8, click "Validate". The Create Backorder? pop up, I click "No Backorder".

Here's what are in the inventory for product ABC.

WH/Output = 2 pcs

WH/Stock = 50 pcs

I expect the 2pcs of the undelivered item will be automatically add back to WH/Stock but it does not??? Do I need to write code to do that or I am missing something to set it as an automated process???

Can you please let me know? Thanks.

Regards,

Simon

Hi Simon,

Prior to setting up the operation types, you would need to finalize your delivery process. In the use case you have described I understand the physical movement of the products passes through the below locations

Stock(10) > Output(10) > Customer location(10-2) > back to WH(2) > Stock (storage location)

To accomplish the above, you would require to complete delivery (validate) of 10 units and then click "return" on delivery order for 2 Units. All units were delivered to customer, while customer is returning 2 units

However, in your method by validating only 8 units, it represents that 10 units were picked from physical location Stock and moved to location output while only 8 were taken out to customer location, 2 were left behind at output location.

Stock(-10) > Output(2) > customer location(8)

The 2 units are still within the WH and counted as product stock (stock as in product Qty not location within WH). To put these 2 units back to their shelves (product location WH/Stock), you would need to create "return" on the validated 'Pick" workflow. OR create a manual internal transfer operation.

Basis your process, you would require to define the operation types

WH/Output > WH/Stock (return on pick operation)

Partner location/vendor > WH/Stock (return on delivery order)

Hope this explains.

===================

In the interest of this forum, could I suggest we continue this discussion off-line? Please feel free to email me directly jaideepj@hotmail.com

Thanks

Jaideep