Odoo Help


This community 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.


SOLVED!!! website.support.ticket default state

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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