Skip to Content
Menu
This question has been flagged
2 Replies
4087 Views

Hello! How change the default state in website support ticket when create new ticket? If I change the name or delete the state open I have a error: Odoo Server Error

Thank You!

Sorry My english!


Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/openerp/http.py", line 544, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/site-packages/openerp/http.py", line 581, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/site-packages/openerp/http.py", line 317, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openerp/http.py", line 314, in checked_call
    return self.endpoint(*a, **kw)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 810, in __call__

    return self.method(*args, **kw)
  File "/usr/lib/python2.7/site-packages/openerp/http.py", line 410, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/openerp/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python2.7/site-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openerp/api.py", line 372, in old_api
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openerp/models.py", line 1326, in default_get
    defaults[name] = field.default(self)
  File "/usr/lib/python2.7/site-packages/openerp/addons/website_support/website_support_ticket.py", line 14, in _open_ticket
    return open_state[0]
  File "/usr/lib/python2.7/site-packages/openerp/models.py", line 5657, in __getitem__
    return self._browse(self.env, (self._ids[key],))
IndexError: tuple index out of range

Avatar
Discard

with an automated action e.g. ...

Author Best Answer

Ok but I have create Server Action:

Name: state

Base model: website.support.ticket

action: Execute Python Code

Python Code:?

I'm sorry but I do not know what to insert !


I have find a solution in this post: https://www.odoo.com/nl_NL/forum/help-1/question/default-field-value-of-a-form-view-45265


Thank You!!!

Avatar
Discard