Advertisement
Guest User

error log

a guest
Dec 12th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. Error:
  2. Odoo Server Error
  3.  
  4. Traceback (most recent call last):
  5. File "/opt/odoo12/odoo/tools/safe_eval.py", line 350, in safe_eval
  6. return unsafe_eval(c, globals_dict, locals_dict)
  7. File "", line 11, in <module>
  8. File "/opt/odoo12/odoo/sql_db.py", line 148, in wrapper
  9. return f(self, *args, **kwargs)
  10. File "/opt/odoo12/odoo/sql_db.py", line 225, in execute
  11. res = self._obj.execute(query, params)
  12. psycopg2.IntegrityError: update or delete on table "saloka_pos_session" violates foreign key constraint "saloka_sale_session_id_fkey" on table "saloka_sale"
  13. DETAIL: Key (id)=(320) is still referenced from table "saloka_sale".
  14.  
  15.  
  16. During handling of the above exception, another exception occurred:
  17.  
  18. Traceback (most recent call last):
  19. File "/opt/odoo12/odoo/http.py", line 653, in _handle_exception
  20. return super(JsonRequest, self)._handle_exception(exception)
  21. File "/opt/odoo12/odoo/http.py", line 312, in _handle_exception
  22. raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  23. File "/opt/odoo12/odoo/tools/pycompat.py", line 87, in reraise
  24. raise value
  25. File "/opt/odoo12/odoo/http.py", line 695, in dispatch
  26. result = self._call_function(**self.params)
  27. File "/opt/odoo12/odoo/http.py", line 344, in _call_function
  28. return checked_call(self.db, *args, **kwargs)
  29. File "/opt/odoo12/odoo/service/model.py", line 97, in wrapper
  30. return f(dbname, *args, **kwargs)
  31. File "/opt/odoo12/odoo/http.py", line 337, in checked_call
  32. result = self.endpoint(*a, **kw)
  33. File "/opt/odoo12/odoo/http.py", line 938, in __call__
  34. return self.method(*args, **kw)
  35. File "/opt/odoo12/odoo/http.py", line 517, in response_wrap
  36. response = f(*args, **kw)
  37. File "/opt/odoo12/addons/web/controllers/main.py", line 966, in call_button
  38. action = self._call_kw(model, method, args, {})
  39. File "/opt/odoo12/addons/web/controllers/main.py", line 954, in _call_kw
  40. return call_kw(request.env[model], method, args, kwargs)
  41. File "/opt/odoo12/odoo/api.py", line 749, in call_kw
  42. return _call_kw_multi(method, model, args, kwargs)
  43. File "/opt/odoo12/odoo/api.py", line 736, in _call_kw_multi
  44. result = method(recs, *args, **kwargs)
  45. File "/opt/odoo12/odoo/addons/base/models/ir_cron.py", line 76, in method_direct_trigger
  46. self.sudo(user=cron.user_id.id).ir_actions_server_id.run()
  47. File "/opt/odoo12/odoo/addons/base/models/ir_actions.py", line 565, in run
  48. res = func(action, eval_context=eval_context)
  49. File "/opt/odoo12/odoo/addons/base/models/ir_actions.py", line 441, in run_action_code_multi
  50. safe_eval(action.sudo().code.strip(), eval_context, mode="exec", nocopy=True) # nocopy allows to return 'action'
  51. File "/opt/odoo12/odoo/tools/safe_eval.py", line 373, in safe_eval
  52. pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
  53. File "/opt/odoo12/odoo/tools/pycompat.py", line 86, in reraise
  54. raise value.with_traceback(tb)
  55. File "/opt/odoo12/odoo/tools/safe_eval.py", line 350, in safe_eval
  56. return unsafe_eval(c, globals_dict, locals_dict)
  57. File "", line 11, in <module>
  58. File "/opt/odoo12/odoo/sql_db.py", line 148, in wrapper
  59. return f(self, *args, **kwargs)
  60. File "/opt/odoo12/odoo/sql_db.py", line 225, in execute
  61. res = self._obj.execute(query, params)
  62. ValueError: <class 'psycopg2.IntegrityError'>: "update or delete on table "saloka_pos_session" violates foreign key constraint "saloka_sale_session_id_fkey" on table "saloka_sale"
  63. DETAIL: Key (id)=(320) is still referenced from table "saloka_sale".
  64. " while evaluating
  65. '# Available variables:\n# - env: Odoo Environment on which the action is triggered\n# - model: Odoo Model of the record on which the action is triggered; is a void recordset\n# - record: record on which the action is triggered; may be void\n# - records: recordset of all records on which the action is triggered in multi-mode; may be void\n# - time, datetime, dateutil, timezone: useful Python libraries\n# - log: log(message, level=\'info\'): logging function to record debug information in ir.logging table\n# - Warning: Warning Exception to use with raise\n# To return an action, assign: action = {...}\n\nenv.cr.execute("DELETE FROM saloka_pos_session WHERE pos_id = (SELECT id FROM saloka_pos WHERE name = \'192.168.1.18\' LIMIT 1) AND state = \'opened\'")\nenv.cr.commit()'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement