Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
2121 มุมมอง

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 ?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 22
1684
1
พ.ค. 16
4172
2
มิ.ย. 17
8978
2
พ.ค. 16
12935
1
เม.ย. 25
4460