跳至内容
菜单
此问题已终结
4 回复
4083 查看

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. 

形象
丢弃
编写者 最佳答案

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.

形象
丢弃
最佳答案

Hello,

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

形象
丢弃
编写者

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?

编写者

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.

相关帖文 回复 查看 活动
2
12月 16
6708
3
12月 19
4523
1
3月 15
11138
0
4月 16
3480
4
3月 15
13664