Odoo Help


SOLVED!!! website.support.ticket default state

on 8/1/16, 6:03 AM 871 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

with an automated action e.g. ...

Jérémy Kersten (jke)
on 8/1/16, 12:20 PM
On 8/2/16, 2:19 AM

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!!!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/1/16, 6:03 AM
Seen: 871 times
Last updated: 8/2/16, 6:24 AM