コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
2781 ビュー

Hello Odooers,

I have this error whenever I try to click the button "Replenish" in the product form. I don't know why it runs in error in fact I didn't touch it. Can someone help me and explain this error thank you.

Traceback (most recent call last):
  File "/home/odoo/src/odoo/saas-17.1/odoo/http.py", line 1848, in _transactioning
    return service_model.retrying(func, env=self.env)
  File "/home/odoo/src/odoo/saas-17.1/odoo/service/model.py", line 134, in retrying
    result = func()
  File "/home/odoo/src/odoo/saas-17.1/odoo/http.py", line 1826, in _serve_ir_http
    return self._serve_ir_http(rule, args)
  File "/home/odoo/src/odoo/saas-17.1/odoo/http.py", line 1833, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/home/odoo/src/odoo/saas-17.1/odoo/http.py", line 2058, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/home/odoo/src/odoo/saas-17.1/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/home/odoo/src/odoo/saas-17.1/odoo/http.py", line 740, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/home/odoo/src/odoo/saas-17.1/addons/web/controllers/dataset.py", line 38, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/saas-17.1/addons/web/controllers/dataset.py", line 34, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/saas-17.1/odoo/api.py", line 458, in call_kw
    result = getattr(recs, name)(*args, **kwargs)
  File "/home/odoo/src/odoo/saas-17.1/addons/web/models/models.py", line 938, in onchange
    defaults = self.default_get(missing_names)
  File "/home/odoo/src/odoo/saas-17.1/addons/purchase_stock/wizard/product_replenish.py", line 16, in default_get
    res = super().default_get(fields)
  File "/home/odoo/src/odoo/saas-17.1/addons/stock/wizard/product_replenish.py", line 86, in default_get
    res['route_id'] = self.env['stock.route'].search(self._get_route_domain(product_tmpl_id), limit=1).id
  File "/home/odoo/src/odoo/saas-17.1/addons/purchase_stock/wizard/product_replenish.py", line 102, in _get_route_domain
    domain = AND([domain, [('id', '!=', self.env.ref('purchase_stock.route_warehouse0_buy', raise_if_not_found=False).id)]])
AttributeError: 'NoneType' object has no attribute 'id'


アバター
破棄
著作者

Hello DN, thank you for your answer. May I know where to locate the 'route_warehouse0_buy' I try to locate it but couldn't find it. Thank you.

Hi try to unarchive the warehouse and search again sir

最善の回答

Hi,Firstly, comment out the custom addons path from your Odoo configuration file to confirm whether the issue is arising from your custom addons. If the issue does not persist after commenting out your custom addons, you can verify that the error is originating from the custom addons. You should then track down the module causing the issue and fix it.


If the issue persists even after commenting out the custom addons, please attempt to upgrade the modules stock and product_stock, and then try again. This may help resolve the issue.


Hope it helps

アバター
破棄
著作者 最善の回答

Additionally, we have archived the previous warehouse before created a new one. Does this affect the archived products from previous warehouse?

 
When we try to replenish a product, the route id is important and I guess Odoo doesn't detect the route id that's why it causes error. I guess the route id of the archived product has been deleted when we create a new one.

Thank you for your answers. Please, answer in the comment since I can't comment due to low karma. Thank you.

アバター
破棄
最善の回答

This is because the 'route_warehouse0_buy' has been deleted recently in you database, have you delete anything regard to route recently ?

アバター
破棄
関連投稿 返信 ビュー 活動
1
11月 22
1965
1
5月 16
4474
2
6月 17
9225
2
5月 16
13249
1
4月 25
4944