This question has been flagged
2 Replies
5123 Views

Version: Odoo 13.0+e (Enterprise Edition) (Trial Database)

I tried following the guide below and its prerequisites:
https://www.odoo.com/documentation/user/13.0/manufacturing/management/subcontracting.html#resupply-the-subcontractor-with-the-components

However, when I tried to manually create a delivery order, I cannot set the destination location to be the Subcontractor location since the field is hidden. I already set the delivery address to a partner that I've set as a subcontractor in a BOM but when I check the tree view, it says that the destination location is Customer. Even if I try to create a transfer manually, once I set the operation type to a Delivery Order, the destination location becomes hidden.

I've also tried going to the product form view and click on the Replenish button and setting the route to Resupply Subcontractor but it does not create any transfer.

Additional Info:​
- I am using the 3 step delivery (pick + pack + ship)

Thank you in advance to those that will answer!

Avatar
Discard
Best Answer

Hi Rainier:

The issue seems to be caused by the following.

When you create the Partner record for the Subcontractor, Odoo assigns the following default values for the locations associated with the Subcontractor in the Inventory section of the Sales & Purchase tab of the partner's Contact record:

  • Customer Location: Partner Locations/Customers

  • Vendor Location: Partner Locations/Vendors

  • Subcontractor Location: Partner Locations/Subcontracting Location

As a result of this, it always assigns Partner Locations/Customers as the delivery location when you create the Delivery Order for the resupply to the Subcontractor.

The Subcontractor Location is probably getting used when you automatically trigger the Resupply by using the 3rd option in the documentation (I haven't had the chance to explore this yet but it is worth looking into). However, this would be useful only if you use the Sales module.

This leaves two options:

  1. Update the Customer Location on the Contact record to Partner Locations/Subcontracting Location. The downside of this is that you will not be able to make a regular sale to this Partner if it is ever needed in the future.

  2. Customize the Delivery Order form and make the Delivery Location field updatable. Personally, I find this option cleaner than the first option since you will be able to make a regular sale to this Partner if it is ever needed in the future.

Hope this helps.

EDIT: Confirmed that the 3rd option works as documented (automatic creation of Delivery order) with the correct Destination Location. 

You need to do the following to simulate the whole automated flow:

  1. Set the route to Resupply Subcontractor on Order on each of the components listed in the BoM of your subcontracted product.

  2. Create and confirm a PO for the subcontracted Product (since you will be procuring the subcontracted product from the subcontractor).

This will automatically create a Delivery Order for the subcontractor containing the components in your BoM. The destination location is set to  Partner Locations/Subcontracting Location in this case.

You can then complete the processing of the Delivery Order to supply the product to the subcontractor and then receive subcontracted product from the subcontractor using the receipt that was generated when the PO was confirmed. 

If you need to automate the complete cycle starting with Sales, you can set the route of the subcontracted product to Buy and set the subcontractor as the vendor for the product. When you sell the product, it will automatically trigger off a RFQ/PO to the Vendor. When you confirm the PO, it will automatically trigger the Delivery Order of the components to the subcontractor and a receipt for the subcontracted product from the subcontractor.  ​​   ​

Avatar
Discard
Author Best Answer

Hi Paresh:

Thank you very much for your well documented answer!

> As a result of this, it always assigns Partner Locations/Customers as the delivery location when you create the Delivery Order for the resupply to the Subcontractor.

Yes this is the behavior.

> Confirmed that the 3rd option works as documented (automatic creation of Delivery order) with the correct Destination Location. 

Yes I was able to make this work as well. However what I need is for the manual creation.

> This leaves two options:

  1. Update the Customer Location on the Contact record to Partner Locations/Subcontracting Location. The downside of this is that you will not be able to make a regular sale to this Partner if it is ever needed in the future.

This would work but ugly because as you have mentioned it I will not be able to make a regular sale to the subcontractor. 

> Customize the Delivery Order form and make the Delivery Location field updatable. Personally, I find this option cleaner than the first option since you will be able to make a regular sale to this Partner if it is ever needed in the future.

This will also work but requires customization which I would like to avoid.

---

Your answers were very helpful but I will not tag it as the answer yet because the solutions are hacky or requires additional customization. But still it deserves an upvote :)

EDIT: Too bad I cannot give an upvote yet because apparently I don't have enough karma :( will do it in the future

I actually found some work arounds in case someone else encounters this problem. However it does not follow the Odoo guide. See below:

  1. Create a Planned Internal Transfer. Internal Transfers do not hide the source and destination location. I think it still makes sense since Subcontractor Locations are considered as internal location. However the problem is it might confuse the inventory user as transfer within the same warehouse

  2. Create a Delivery Order to the Subcontractor. Switch to tree/list view then check the created transfer. This will allow you to edit the Destination Location :P

Avatar
Discard

Not sure if you got a chance to check out the solution in the EDIT part of my post. It does not involve a hack or a customization provided you have the Purchase module installed.

Author

Yes I saw it. However I do not want to trigger the resupply only when I create a PO to the subcontractor.