Skip to Content
Menu
This question has been flagged
4 Replies
3022 Views

I am trying to slightly alter the default behavior of SO and MO, for this I have inherit a method make_mo.

There's a method in procurement order called make_mo, I want to inherit this method but I cant understand when and how this method can be called. I have added logs and prints in this method, and confirm a SO but no prints or logs generated. I have also created BOM for my product and set inventory options to MTO and Manufacture but still no logs and prints generated that will say that the method was called. 

Avatar
Discard
Author Best Answer

The reason I found for my trouble was that the origin in the MO is now not the same as the SO sequence name. It now also contains some others characters like SO1538_0001:WH: Stock -> Customers MTO. I was considering it same as the sale order name.

Previously In openerp 7 this method make_mo set the SO name in the MO's origin, and one more thing I noticed is that the vals in the procurement created by order confirmation does not contains the values like sale_line_id etc. Most probably procurement is now getting its vals from the stock move not directly from the sale order line as in openerp 7.

Avatar
Discard
Best Answer

Hello,

This function called in this line same .py of the function definition. You can make a scenario that meet the if condition.

Avatar
Discard
Author

This tells us that if the procurement order have a rule id and method set to manufacture then this method will be called. But this is not in my case. Any hints ? Do I have to set some configurations for sale, inventory etc?

Author

The reason I found for my trouble was that the origin in the MO is now not the same as the SO sequence name. It now also contains some others characters like SO1538_0001:WH: Stock -> Customers MTO Previously In openerp 7 this method make_mo set the SO name in the MO's origin, and one more thing I noticed is that the vals in the procurement created by order confirmation does not contains the values like sale_line_id etc. Most probably procurement is not getting its vals from the stock move not directly from the sale order line.

Related Posts Replies Views Activity
2
Dec 16
5552
3
Dec 19
4523
1
Mar 15
10149
0
Apr 16
2678
4
Mar 15
12455