← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 754263] Re: Error in tax code search form

 

updated: case code = 08, 09 It also make error like above.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/754263

Title:
  Error in tax code search form

Status in OpenERP Web Client:
  New

Bug description:

  I have issue related to tax code definition
  1. Go to menu Account/Configuration/Financial Accounting/Taxes/Tax Codes

  2. Edit an entry with case code = 28, or case code = 029 => error
  occurs

  3. Create a new entry in the 'Search Tax Codes' form 
  - Error occurs with 2 special patterns, case code = 028, and case code = 029 when saving the entry
  - Although error occurs but the entry is still saved

  3. There are 2 special patterns that make error occuring with long message, at the end is (the same for text='029')
  ===
  <type 'exceptions.SyntaxError'>: invalid token (<unknown>, line 1)
        args = ('invalid token', ('<unknown>', 1, 3, '028'))
        filename = '<unknown>'
        lineno = 1
        message = ''
        msg = 'invalid token'
        offset = 3
        print_file_and_line = None
        text = '028' 
  ===

  This is from /var/log/openerp-web/error log file, in the case of editing an entry with case code = 028
  ===
  [08/Apr/2011:10:39:08] HTTP 
  Request Headers:
    REFERER: http://192.168.1.143:8080/openerp/menu?active=121
    HOST: 192.168.1.143:8080
    X-REQUESTED-WITH: XMLHttpRequest
    ACCEPT: */*
    ACCEPT-CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    USER-AGENT: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.18) Gecko/20110319 Firefox/3.5.18
    CONNECTION: keep-alive
    COOKIE: session_id=217c2e07e02f9236905f9b3da3077444b474dd19; terp_db=acc_01; terp_user=admin
    Remote-Addr: 192.168.1.130
    ACCEPT-LANGUAGE: en-us,en;q=0.5
    ACCEPT-ENCODING: gzip,deflate
    KEEP-ALIVE: 300
  [08/Apr/2011:10:39:08] HTTP Traceback (most recent call last):
    File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py", line 606, in respond
      cherrypy.response.body = self.handler()
    File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpdispatch.py", line 25, in __call__
      return self.callable(*self.args, **self.kwargs)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/openobject/tools/_expose.py", line 182, in func_wrapper
      res = func(*args, **kw)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/openobject/controllers/_root.py", line 87, in default
      return request.handler()
    File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpdispatch.py", line 25, in __call__
      return self.callable(*self.args, **self.kwargs)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/controllers/utils.py", line 112, in wrapper
      return fn(*args, **kw)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/openobject/tools/_expose.py", line 182, in func_wrapper
      res = func(*args, **kw)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/controllers/form.py", line 328, in edit
      return self.create(params)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/controllers/utils.py", line 112, in wrapper
      return fn(*args, **kw)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/openobject/tools/_expose.py", line 182, in func_wrapper
      res = func(*args, **kw)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/controllers/form.py", line 195, in create
      form = self.create_form(params, tg_errors)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/controllers/form.py", line 186, in create_form
      return tw.form_view.ViewForm(params, name="view_form", action="/openerp/form/save")
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/form_view.py", line 90, in __init__
      selectable=params.selectable or 2)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/screen.py", line 107, in __init__
      self.add_view_id(self.view_id, self.view_type)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/screen.py", line 123, in add_view_id
      self.add_view(view, view_type)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/screen.py", line 131, in add_view
      self.widget = get_view_widget(view_type, self)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/_views.py", line 137, in get_view_widget
      return view(screen)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/_views.py", line 66, in __call__
      nodefault=screen.nodefault, nolinks=screen.link)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/form/_form.py", line 805, in __init__
      self.frame = self.parse(prefix, dom, fields, values)[0]
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/form/_form.py", line 865, in parse
      n = self.parse(prefix=prefix, root=node, fields=fields, values=values)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/form/_form.py", line 880, in parse
      n = self.parse(prefix=prefix, root=node, fields=fields, values=values)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/form/_form.py", line 908, in parse
      field = self._make_field_widget(fields[name], values.get(name))
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/widgets/form/_form.py", line 980, in _make_field_widget
      cherrypy.request.terp_record[name] =  field.get_value()
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/utils/utils.py", line 129, in __setitem__
      value = self._eval(value)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/utils/utils.py", line 112, in _eval
      return openobject.tools.ast.literal_eval(value)
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/openobject/tools/ast.py", line 24, in literal_eval
      node_or_string = parse(node_or_string, mode='eval')
    File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/openobject/tools/ast.py", line 13, in parse
      return compile(expr, filename, mode, PyCF_ONLY_AST)
    File "<unknown>", line 1
      028
        ^
  SyntaxError: invalid token
  ===



References