I have the following case: I have 2 companies, in company 1 I issue a sales order and after issuing it, I developed a code to create a purchase order directly. When I confirm the purchase order, a sales order is created in company 2 after I activated the synchronization option between the 2 companies. The product I have consists of a bom of type kit. How I can make the product in company 1 just issue me a delivery order when I confirm the sales order and at the same time make it issue a manufacturing order when confirmed in company 2. Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
You can create two different routes for the same product in each company.
For Company 1:
Go to the "Inventory" app and select "Routes" under "Configuration".
Click on the "Create" button to create a new route.
Give a name to the route, select "Manufacture" as the operation type, and select the appropriate Manufacturing location as the destination.
Set the "Active" field to true and select Company 1 under "Companies".
Save the route.
For Company 2:
Go to the "Inventory" app and select "Routes" under "Configuration".
Click on the "Create" button to create a new route.
Give a name to the route, select "Ship To" as the operation type, and select the appropriate Customer as the destination.
Set the "Active" field to true and select Company 2 under "Companies".
Save the route.
Next, assign the appropriate route to the product in each company.
For Company 1:
Go to the "Inventory" app and select "Products" under "Master Data".
Open the product for which you want to create a manufacturing order.
In the "Inventory" tab, select the route you created for Company 1 from the "Routes" field.
Save the product.
For Company 2:
Go to the "Inventory" app and select "Products" under "Master Data".
Open the product for which you want to create a delivery order.
In the "Inventory" tab, select the route you created for Company 2 from the "Routes" field.
Save the product.
Now, when you create a sales order in Company 1, a delivery order will be created automatically using the route assigned to the product for Company 2. When you create a purchase order in Company 1, a manufacturing order will be created automatically using the route assigned to the product for Company 1. When you confirm the purchase order, a sales order will be created in Company 2 using the route assigned to the product for Company 2.
I created 2 routes: In company 1 where I need to deliver only. I created a route called 'Ship To' and assigned the action as 'Push To', set the operation type to 'Delivery Orders' and defined the source and destination location. In Company 2, I created a route called 'Manufacture' ,set the action as 'Manufacture', the operation type to 'Manufacturing, and defined the source and destination location. I also make sure to put the correct route for the product in each company. In company1 where I need to deliver, I set the route as 'Ship To' and in company 2 I set it 'Manufacture'. Now, when I create an SO from company1 and confirm it, I am getting a validation error that a product found in the bom has no reordering rules. How can I solve this? Thanks
I think that one of the products in your bill of materials (BOM) doesn't have any reordering rules defined. Reordering rules are used by Odoo to determine when to create a procurement request to purchase or manufacture a product.
To solve this issue, you should define reordering rules for the product that is causing the error. Here are the steps to do this:
Go to the Inventory app and select the "Products" menu item.
Find the product that is causing the error and open its form view.
Select the "Inventory" tab and scroll down to the "Reordering Rules" section.
Click the "Add an item" button to create a new reordering rule.
In the "Procurement Method" field, select "Make To Order" if you manufacture the product or "Buy" if you purchase it.
In the "Minimum Quantity" field, enter the minimum amount of the product that you want to keep in stock before reordering.
In the "Maximum Quantity" field, enter the maximum amount of the product that you want to keep in stock.
In the "Quantity Multiple" field, enter the quantity that you want to order each time you create a procurement request for this product.
In the "Location" field, select the location where you want to stock this product.
Save the reordering rule and the product.
By defining reordering rules for the product, Odoo will now be able to create a procurement request when the stock level falls below the minimum quantity defined in the reordering rule. This should solve the validation error that you are encountering.
Thank you for the insight, yes I am familiar with the following steps. For now, I just removed the route 'Replenish on Order' on both raw materials. I followed your first answer and now when creating a sales order I am getting only delivery which is right, my code create a PO and then I confirm it. Now, when I go to company 2, I find that the order has no manufacturing smart button created on it, even though I defined the route on company 2 as manufacturing. Can you help please
If I understand correctly, you have set the route 'Manufacturing' on the product in company 2, but when you create a sales order for that product in company 1 and confirm the corresponding purchase order in company 2, you do not see the manufacturing order smart button on the purchase order in company 2.
There could be several reasons why the manufacturing order smart button is not appearing on the purchase order in company 2. Here are some things you can check:
Make sure that the route 'Manufacturing' is actually defined in company 2. You can do this by going to the Inventory app in company 2, selecting the product in question, and checking the 'Routes' tab to see if the 'Manufacturing' route is listed and active.
Make sure that the product in company 2 has a bill of materials (BOM) defined for it. The BOM defines the components and quantities required to manufacture the finished product. If the BOM is not defined, the system will not be able to create a manufacturing order.
Check that the manufacturing settings are properly configured in company 2. Go to the Manufacturing app in company 2 and check the settings under 'Configuration' to ensure that everything is set up correctly.
Verify that the user in company 2 has the necessary access rights to view the manufacturing order smart button. You can do this by going to the user's settings and checking the access rights for the 'Manufacturing Orders' module.
If none of these suggestions solve the issue, please provide more details about the steps you followed and the specific error messages or behaviors you are seeing.
No, I am creating a sales order in company 1, when I confirm it, it directly creates a purchase order in company 1 (done through code). When I confirm the PO in Company 1 it creates a sales order in Company 2 (This option is activated by synchronizing through companies). What I need: When I confirm the SO in company 1, I just need to create a delivery order. And the SO in company 2, I need it to create me an MO. That's all
Thank you for clarifying your requirements.
To achieve this, you can customize the behavior of the sales and purchase order confirmations in Odoo. Here's an overview of the steps you can follow:
In the Sales module, create a custom module or modify an existing module to override the default behavior of the sales order confirmation. You can do this by creating a new Python class that inherits from the original sales order confirmation class and overrides the create_purchase_order method to create a delivery order instead of a purchase order.
In the Manufacturing module, create a custom module or modify an existing module to override the default behavior of the purchase order confirmation. You can do this by creating a new Python class that inherits from the original purchase order confirmation class and overrides the create_sale_order method to create a manufacturing order instead of a sales order.
Use the Odoo multi-company feature to configure the relationships between the sales and purchase orders in the two companies. You can do this by setting up inter-company rules to automate the creation of the delivery order in Company 1 and the manufacturing order in Company 2.
Test your customizations to make sure that the delivery orders and manufacturing orders are created correctly when the sales and purchase orders are confirmed.
Note that this customization requires some development skills in Python and Odoo. If you are not familiar with Odoo development, you may need to seek assistance from an experienced developer.
There are many steps you must take to accomplish this. I found the above answers very good and helpful, you can refer to them for more information
Thank you for the insight, yes I am familiar with the following steps. For now, I just removed the route 'Replenish on Order' on both raw materials. I followed your first answer and now when creating a sales order I am getting only delivery which is right, my code create a PO and then I confirm it. Now, when I go to company 2, I find that the order has no manufacturing smart button created on it, even though I defined the route on company 2 as manufacturing. Can you help please
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jul 25
|
596 | ||
|
3
Jan 25
|
2728 | ||
|
5
Aug 23
|
5714 | ||
|
0
Jun 22
|
3032 | ||
|
1
Nov 19
|
3754 |