Odoo Help


[9.0] How to set the route Make to Order of products on True by default ?

on 4/12/16, 3:40 AM 327 views

Hi, with a custom module, I synchronize a lot of products but I would like that their route Make to Order is set on True by default.

How can I do this?

On 4/12/16, 4:28 AM

Have to to do this sample code then create the product template :

mto_ids = product_routes.search(['|', ('name', '=', 'Make To Order'), ('name', '=', 'Buy')])

route = []

for d in mto_ids:


tmpl_id = product_tempalte.create({'valuation':'manual_periodic', 'name':champ[3], 'standard_price':champ[5], 'description':champ[3],

'route_ids':[(6, 0, route)], 'type':'product'})

On 10/3/16, 7:35 AM

How to use the above code, i mean in which file.

i am bit new here

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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/12/16, 3:40 AM
Seen: 327 times
Last updated: 10/3/16, 7:35 AM