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.

1

Error on create a warehouse

By
Alan.Jiang
on 9/19/14, 4:50 AM 1,801 views

V:8.0-29e08a2.

When i create a new warahouse in Warehouse Management model,An error occurred .

info : Can't find any generic Buy route.

 

same case here in the version V8.0

Qamar Soft
on 9/24/14, 10:26 AM

Please provide some more information such as a logfile or printscreen of the error. This will get us more details and you will get more answers.

Yenthe
on 9/24/14, 10:37 AM
2
Qamar Soft
On 9/24/14, 10:57 AM

here is a log about creating new warehouse

2014-09-24 14:55:16,639 12667 INFO DB8 werkzeug: 127.0.0.1 - - [24/Sep/2014 14:55:16] "POST /web/dataset/call_kw/stock.warehouse/name_get HTTP/1.1" 200 -
2014-09-24 14:56:03,355 12667 ERROR coma8 openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 499, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 516, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 282, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 279, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 732, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo-8.0/openerp/http.py", line 375, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo-8.0/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo-8.0/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/addons/stock/stock.py", line 3301, in create
    new_objects_dict = self.create_routes(cr, uid, new_id, warehouse, context=context)
  File "/opt/odoo/odoo-8.0/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/addons/mrp/stock.py", line 271, in create_routes
    res = super(stock_warehouse, self).create_routes(cr, uid, ids, warehouse, context=context)
  File "/opt/odoo/odoo-8.0/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/addons/purchase/stock.py", line 197, in create_routes
    buy_pull_vals = self._get_buy_pull_rule(cr, uid, warehouse, context=context)
  File "/opt/odoo/odoo-8.0/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-8.0/addons/purchase/stock.py", line 182, in _get_buy_pull_rule
    raise osv.except_osv(_('Error!'), _('Can\'t find any generic Buy route.'))

After debuggin the code I found that the line 179 in the addons/purchase/stock.py

buy_route_id = route_obj.search(cr, uid, [('name', 'like', _('Buy'))], context=context)

doesn't resent the exist id in the database !!!

is this an error in the function search  ?!!!

resolved:

  1.  In Configuration/routes/buy
  2. add the warehouse in the pull rules as : Route=Buy And Action=Buy
  3. save and now you can create other WH

 

 

 

While I'm not sure how to fix this I can tell you what causes it. Your error tells it quite specific. "Can't find any generic Buy route" is your problem. Google around for some help on the matter, perhaps this could help you some further: http://www.slideshare.net/openobject/odoo-warehouse-management

Yenthe
on 9/25/14, 2:03 AM

thanks brother,the routing and the configuration of the warehouse is all okay , I don't know why this error is raised (what generic Buy route !!!! )

Qamar Soft
on 9/25/14, 7:10 AM

resolved: go to Configuration/routes/buy and add the other warehouse in the pull rules as : Route=Buy And Action=Buy

Qamar Soft
on 9/25/14, 10:20 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

3 follower(s)

Stats

Asked: 9/19/14, 4:50 AM
Seen: 1801 times
Last updated: 2/4/16, 2:32 AM