Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
4061 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

Hello,

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

Avatar
Zrušit
Autor

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?

Autor

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 Odpovědi Zobrazení Aktivita
2
pro 16
6678
3
pro 19
4523
1
bře 15
11099
0
dub 16
3427
4
bře 15
13637