Skip to Content
Menu
This question has been flagged

Hello guys,

I'd know the function which called  "Sale 'action_confirm' was clicked" if ProductTemplate "Inventory, Routes 'Make to Order' was checked" ??

The problem is: i will put a product into mrp_production if sale_order_line has element get 'Make to Order'.

When i click 'action_confirm' => Confirm Sale, i'll know when self.env['mrp.production'] is called.


Thanks


Avatar
Discard

Hello,

I don't understand your question / problem. Can you give us an example of what you want to achieve ?

Author

I would like to know when "mrp_production" is called when the sale is confirmed, if the product in question is marked "Make To Order" in the Inventory tab.

Author

Sorry , marked "Product" or "Manufacture"

Author

I'll get the current mrp.prduction if i click action_confirm # raise UserError('Your mrp_production_id %d' % xx.id)

Hi,

What is your exact need,want know which function in odoo(python) is calling while we applying the routes?

Author

Yeah,

When we click 'Confirm Sale' in SaleOrder, some products (routes = ['Make To Order', 'Manufacture']) are into MrpProduction.

I'd like to know when in SaleOrder or SaleOrderLine class, these products sent into MrpProduction ??

e.g, If product_id.route_ids in ['Manufacture','Make To Order']:

mrp_production_id.move_raw_ids += [(0,0,'stock_move_id')] # Into Mrp, i will add 'French Azerty Keyboard' (product_id.name = 'French Azerty keyboard') and mrp_production_id.product_id.name = 'GamePC as ProductName'.

Best Answer

Both Made to Order and Manufacture have to be selected in the Product Template if you want Odoo to automatically create a Manufacturing Order. 

Avatar
Discard
Related Posts Replies Views Activity
3
Mar 21
2592
0
Jul 20
1516
0
Apr 20
3
0
Apr 20
2141
1
Jan 18
7353