Unicode error when converting lead into opportunity in CRM module with spanish localization

Bug #523975 reported by Hilario J. Montoliu (hjmf)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Undecided
Unassigned

Bug Description

In CRM module when converting a lead without an associated partner to an opportunity openerp raises an Unicode exception instead of showing the Spanish equivalent of the following warning string:

   «You must assign a partner to this lead before converting to opportunity. You can use the convert to partner button. .»

Obviously this just happens when using the Spanish language. In English everything is fine

The exception is:

[18/Feb/2010:19:02:04] HTTP Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/usr/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/base.py", line 122, in wrapper
    return fn(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/tools/expose.py", line 204, in func_wrapper
    res = func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/tools/utils.py", line 148, in func_wrapper
    return func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/tools/utils.py", line 165, in func_wrapper
    return func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/form.py", line 405, in save
    res = self.button_action(params)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/form.py", line 508, in button_action
    context=params.context or {})
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/actions.py", line 325, in execute_by_id
    return execute(res, **data)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/actions.py", line 274, in execute
    return execute_wizard(action['wiz_name'], **data)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/actions.py", line 109, in execute_wizard
    return Wizard().create(params)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/base.py", line 122, in wrapper
    return fn(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/tools/expose.py", line 204, in func_wrapper
    res = func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/wizard.py", line 166, in create
    return self.execute(params)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/wizard.py", line 85, in execute
    res = rpc.session.execute('wizard', 'execute', wiz_id, datas, state, ctx)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/rpc.py", line 350, in execute
    return self.gateway.execute(obj, method, *args)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/rpc.py", line 154, in execute
    return self.__execute(obj, method, args)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/rpc.py", line 143, in __execute
    raise common.error(_('Application Error!'), str(e))
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/common.py", line 72, in error
    raise TinyError(message=msg, title=title or _("Error"))
TinyError: unicode() argument 2 must be string, not None

The list of modules I'm currently using are:

account
account_balance_reporting
account_financial_report
account_payment
account_payment_extension
account_tax_include
base
base_contact
base_iban
base_setup
base_vat
crm
crm_configuration
crm_profiling
document
document_ics
hr
l10n_ES_account_balance_report
l10n_ES_extractos_bancarios
l10n_ES_partner
l10n_ES_partner_data
l10n_ES_partner_seq
l10n_ES_pyme_custom
l10n_ES_pyme_install
l10n_ES_remesas
l10n_ES_toponyms
l10n_chart_ES
label
mrp
partner_spam
point_of_sale
process
product
purchase
report_crm
sale
sale_payment
smtpclient
stock
use_control

The branch versions I'm using are:

addons/

------------------------------------------------------------
revno: 2585
author: GPA(OpenERP)
committer: Jay(Open ERP)<email address hidden>
branch nick: 5.0
timestamp: Tue 2010-02-16 17:58:39 +0530

extra-addons/

------------------------------------------------------------
revno: 4250
committer: mra (Open ERP)<email address hidden>
branch nick: stable_5.0-extra-addons
timestamp: Tue 2010-02-16 12:45:41 +0530

openerp-server/

------------------------------------------------------------
revno: 1972
committer: Jay(Open ERP)<email address hidden>
branch nick: 5.0
timestamp: Tue 2010-02-16 17:07:24 +0530

openerp-web/

------------------------------------------------------------
revno: 2811
committer: sma(Tiny) <email address hidden>
branch nick: 5.0
timestamp: Mon 2010-02-08 15:05:04 +0530

openerp-spain/

------------------------------------------------------------
revno: 105
committer: Jordi Esteve <email address hidden>
branch nick: lp-openerp-spain-5.0
timestamp: Tue 2010-02-09 20:33:03 +0100

affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
status: New → Confirmed
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Hi!

I've found the same behaviour in another part of the CRM module.

If I try to upload a file to the document server provided by "Document Managemennt" w/o permissions to write in the ftp server, and if the interface is in spanish I get a Unicode exception instead of the spanish equivalent of the TinyWarning:

  TinyWarning: ('Permission Denied !', 'You do not permissions to write on the server side.')

The backtrace of the bug is:

[23/Feb/2010:18:24:10] HTTP Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/usr/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/base.py", line 122, in wrapper
    return fn(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/tools/expose.py", line 204, in func_wrapper
    res = func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/tools/utils.py", line 148, in func_wrapper
    return func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/tools/utils.py", line 165, in func_wrapper
    return func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/controllers/form.py", line 393, in save
    id = proxy.create(data, params.context)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/rpc.py", line 389, in <lambda>
    return lambda *args: self._session.execute("object", "execute", self._resource, name, *args)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/rpc.py", line 350, in execute
    return self.gateway.execute(obj, method, *args)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/rpc.py", line 154, in execute
    return self.__execute(obj, method, args)
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/rpc.py", line 143, in __execute
    raise common.error(_('Application Error!'), str(e))
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/openerp/common.py", line 72, in error
    raise TinyError(message=msg, title=title or _("Error"))
TinyError: unicode() argument 2 must be string, not None

If you believe I should open a new bug report instead of appending it to this thread, please tell me.

--
Hilario J. Montoliu
hmontoliu <at> ubuntu.com
http://hmontoliu.blogspot.com

Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello,

Its fixed in stable and trunk version. Please update your code and notify us.

Revision Info:
Stable: 2820 <email address hidden>
Trunk: 2940 <email address hidden>

Thanks.

Changed in openobject-client-web:
status: Confirmed → Fix Committed
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote : Re: [Bug 523975] Re: Unicode error when converting lead into opportunity in CRM module with spanish localization

sma (Tiny) escribió:
> Hello,
>
> Its fixed in stable and trunk version. Please update your code and
> notify us.
>
> Revision Info:
> Stable: 2820 <email address hidden>
> Trunk: 2940 <email address hidden>
>
> Thanks.
>
>
> ** Changed in: openobject-client-web
> Status: Confirmed => Fix Committed
>

The test case is no longer reproducible

Thanks

--
Hilario J. Montoliu
hmontoliu <at> ubuntu.com
http://hmontoliu.blogspot.com

Changed in openobject-client-web:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.