Skip to Content
Menu
This question has been flagged
1 Odpoveď
4036 Zobrazenia

I have problems trying to start the inventory of a product. When you press the "start inventory" button, the following error appears:

Error:
Odoo Server Error

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 654, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 939, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/stock/models/stock_inventory.py", line 217, in action_start
vals.update({'line_ids': [(0, 0, line_values) for line_values in inventory._get_inventory_lines_values()]})
File "/usr/lib/python3/dist-packages/odoo/addons/stock/models/stock_inventory.py", line 280, in _get_inventory_lines_values
GROUP BY product_id, location_id, lot_id, package_id, partner_id """ % domain, args)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: syntax error at or near ")"
LINE 5: WHERE location_id in () AND quantity != 0 AND a...
^

Avatar
Zrušiť
Best Answer

The locations for the product may be missing. Try this:

  1. Activate developer mode.

  2. Go to the product template record (Inventory > Master Data > Products) of the product which is giving this error.

  3. Check the "Counterpart Locations" section in the "Inventory" tab and make sure the location fields have been set correctly.

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
3
sep 25
5090
3
aug 25
6350
0
dec 22
2758
0
sep 25
396
1
aug 25
1244