Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

When and how method make_mo in procurement can be called?

By
Hammad hussain qureshi
on 2/27/16, 1:27 AM 372 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. 

0

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.

1

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 2/27/16, 4:21 AM

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?

Hammad hussain qureshi
on 2/27/16, 8:36 AM

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.

Hammad hussain qureshi
on 2/28/16, 5:33 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/27/16, 1:27 AM
Seen: 372 times
Last updated: 2/28/16, 5:37 AM