Skip to Content
Menu
This question has been flagged
1 Reply
7761 Views

When i try to save an expense, i get this SERVER ERROR

Odoo version: 10

This thread is also posted on Stackoverflow: https://stackoverflow.com/questions/53631517/programmingerror-relation-hr-expense-id-seq-does-not-exist-odoo-10-0

Odoo Server Error
Traceback (most recent call last):
  File "/home/gloxon/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/gloxon/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/home/gloxon/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/gloxon/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/home/gloxon/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/home/gloxon/odoo/http.py", line 942, in __call__
return self.method(*args, **kw)
File "/home/gloxon/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/home/gloxon/addons/web/controllers/main.py", line 892, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/gloxon/addons/web/controllers/main.py", line 884, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/gloxon/odoo/api.py", line 687, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/home/gloxon/odoo/api.py", line 672, in call_kw_model
result = method(recs, *args, **kwargs)
File "/home/gloxon/addons/mail/models/mail_thread.py", line 228, in create
thread = super(MailThread, self).create(values)
File "/home/gloxon/odoo/models.py", line 3847, in create
record = self.browse(self._create(old_vals))
File "/home/gloxon/odoo/models.py", line 3942, in _create
cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
File "/home/gloxon/odoo/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/home/gloxon/odoo/sql_db.py", line 231, in execute
res = self._obj.execute(query, params)
ProgrammingError: relation "hr_expense_id_seq" does not exist
LINE 1: ...uid", "create_date", "write_date") VALUES(nextval('hr_expens...
                                                             ^

i don't know what the reason is. Need your help. 


Avatar
Discard
Best Answer
Execute Below query and update the value of 0 according to your table.
CREATE SEQUENCE public.hr_expense_id_seq  
INCREMENT 0 
MINVALUE 0 
MAXVALUE 0 
START 0 
CACHE 0;
ALTER TABLE public.hr_expense_id_seq  OWNER TO openpg;


Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
18017
1
Sep 23
1200
3
May 23
4088
7
Apr 23
47087
1
Dec 22
6432