Odoo Help


Setting a default destination location when manufacturing

Fabien M
on 7/6/16, 5:43 AM 368 views


I would like to know how to set the default destination location of my products when they are manufactured. Currently the default location is "stock" and it would be easier to set the provision location by default in my case. How can I do it ? Thank you.

Nikunj Antala
On 7/6/16, 6:42 AM

Hello Fabien,

Odoo set by default stock location in in MRP.

That stock location odoo get from this method if you want then you need change in this method. Or you can override 'location_dest_id' field and set default appropriate value.

def _dest_id_default(self, cr, uid, ids, context=None):


       location_model, location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock')

       self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context)

    except (orm.except_orm, ValueError):

       location_id = False

    return location_id

Hope this help.

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: 7/6/16, 5:43 AM
Seen: 368 times
Last updated: 2/20/17, 7:52 AM