How to create delivery order for confirmed Manufacturing Orders in openerp in custom module? - odoo

How to create delivery order for confirmed Manufacturing Orders in openerp in custom module?Exactly like creating delivery order for confirmed sale/purchase order..

When confirming the sale order a delivery order will be created. When confirming purchase order, a incoming shipment is created.Like that when confirming manufacturing order, an internal move is created.

Related

creation of Manufacturing Order from Sale Order

I know the functional flow of the sale order in which a MO is created for a product that is configured to be manufactured in product master
Below I have descried in brief the Functional flow:
when we create a product and set it as manufacturing we then create a BOM for that respective product, which results in the creation of a Manufacturing Order after confirming a sale order for that product, and the origin field in MO contains the sale order name too.
My question is, Which Method in the backend is responsible for the creation of MO from sale order? actually, the MO is created in the confirmed state and I want it to be created in draft when it is created from Sale Order. so I like to know which method is responsible for that
Manufacture Orders are created as part of the procurement planning system by the Stock Rule object in the method called _run_manufacture
Link to the line where the confirmation takes place.
https://github.com/odoo/odoo/blob/7ec6ae3863da4c7355c4a22ef799815a38188402/addons/mrp/models/stock_rule.py#L55

Odoo 10 - procurement_id in stock_moves

While trying to understand Odoo model for delivery slips I have realized that some stock_moves rows do have procurement_id populated and others do not.
Why is this? When is procurement_id populated?
Procurement_id is populated when the stock move is generated by a procurement. Stock moves created by a sale order are created throught a procurement. A stock move created by purchase order will not have a procurement id because purchase orders do not create stock moves.

what is purpose using routes in sale order lines

When we enable "Choose specific routes on sales order lines (advanced)" in sale module.
After that "routes" field will show on order line in sale order
What is purpose of that routes in sale order.
One of the Best use of route in sale order line is Drop Shipping Delivery.
Drop Shipping : Drop shipping allows to deliver the goods directly from the supplier to the customer. It means that the products does not transit through your stock.
When you Configure Advance routes then you can see Routes menu item & allow to create new routes as well.
When You select DropShippng Option then System will automatically create drop shipping route in the system.
In below example we have create sale order with two products, In one sale order line we have select drop shipping route.
When you confirm Purchase Order then System will create Drop shipment picking from Supplier to Customer.
You can find use of routes from odoo link.
https://www.odoo.com/documentation/user/9.0/inventory/routes/concepts/use_routes.html
This may help you.

Dropship in Odoo

How to configure Dropship in Odoo. I just downloaded the module from the Sales DropShip. But I don`t know how to configure that module. Is there any method for dropshipping. Any help would be appreciated.
Drop-shipping means while delivering the goods, you don't deliver it from the stock, but instead you place an order to supplier (purchase order) and ask them to directly delivery those goods to the customer. So goods doesn't physically comes to your warehouse/company and directly gets delivered to customer from supplier. When the purchase order (which will automatically gets created from the sales order) gets received the sales order automatically gets into the "Done" state.
For configuring it in Odoo, following are the steps:
Install Drop Shipping Module.
On installation it will create a new picking names "Dropship" where you will find the default source location as "Supplier" and default destination location as "Customer"
Also, it will create route which will have a pull rule from Supplier -> Customer
Under the Settings -> Configuration -> Sales -> Sales Features - Select the option "Choose MTO, drop shipping,... on sales order lines", which will allow to select the route on the sale order lines while creating the sales order.
Now, for testing create a product and do the following configuration
Under the route select "Make to order"
Define the supplier for the product
Create the sales order and while entering the sale order lines select the route as "Dropshipping" and confirm it, which will generate the purchase order based on the route, for the supplier defined in the product's supplier info. When you will receive goods in the purchase order, it will take the sales order into the done state. Now you will able to see a button labeled "View Delivery Order" which will take you to delivery order with name prefix as "DS..."
In the purchase order generated, check under the "Deliveries and Invoices" tab, you will find the destination location as "Customer" location.
Note:-
Also, under the Purhcase configuration from setting, if you check the option "Routes - Manage Dropshipping", it will install the dropshipping module.
Hope this helps!!.
It is very simple for the configuration.
Steps are here:
Install Drop Shipping Module.
create a new picking names "Dropship" where you will find the default source location as "Supplier" and default destination location as "Customer"
Under the Settings -> Configuration -> Sales -> Sales Features - Select the option "Choose MTO, drop shipping,... on sales order lines",
Now, for testing create a product and do the following configuration
Still getting issue than, Here I am sharing few post those will help you step by step:
Dropship in Odoo
DropShipping

How to update stocks from supplier invoices in OpenERP 7?

How can I automaticly update stocks whene I make a supplier invoice from Accounting module in OpenERP 7?
you cannot update stock from supplier invoice. Create an incomming shipment. check the boolean field tobe invoiced, specify the partner,then confirm it and receive products. then create a invoice for it.