Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
4016 Vistas

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
Descartar
Autor Mejor respuesta

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
Descartar
Mejor respuesta

Hello,

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

Avatar
Descartar
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.

Publicaciones relacionadas Respuestas Vistas Actividad
2
dic 16
6619
3
dic 19
4523
1
mar 15
11057
0
abr 16
3405
4
mar 15
13586