[account_asset]Traceback when creating new asset

Bug #567736 reported by hbto [Vauxoo] http://www.vauxoo.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Extra Addons (project parking)
New
Undecided
Grzegorz Grzelak (OpenGLOBE.pl)

Bug Description

When Creating a new asset, and selecting Method Type, this Traceback error is shown,

Traceback (most recent call last):
  File "/home/nhomar/openerp/stable/5.0/instancias/hbto/server/bin/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/nhomar/openerp/stable/5.0/instancias/hbto/server/bin/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/home/nhomar/openerp/stable/5.0/instancias/hbto/server/bin/service/web_services.py", line 576, in execute
  File "/home/nhomar/openerp/stable/5.0/instancias/hbto/server/bin/osv/osv.py", line 58, in wrapper
  File "/home/nhomar/openerp/stable/5.0/instancias/hbto/server/bin/osv/osv.py", line 119, in execute
  File "/home/nhomar/openerp/stable/5.0/instancias/hbto/server/bin/osv/osv.py", line 111, in execute_cr
  File "/home/operador/hbto/server/bin/addons/account_asset/account_asset.py", line 354, in onchange_take_defaults
    type_code = self.pool.get('account.asset.method.type').browse(cr, uid, method_type,{}).code
NameError: global name 'method_type' is not defined

==============
This is the revision of your module I was using when this bug spring up.
Branched 4318 revision(s).

Thanks in advance for your help

Changed in openobject-addons:
assignee: nobody → Grzegorz Grzelak (Cirrus.pl) (grzechu.g)
affects: openobject-addons → openobject-extra-addons
Revision history for this message
Grzegorz Grzelak (OpenGLOBE.pl) (grzegorz-og.pl) wrote :

New account-asset module is available in stable-extra. Can you check from there?

If bug still exist please describe from which menu you enter into view and what was configured before.

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote : Re: [Bug 567736] Re: [account_asset]Traceback when creating new asset

Hello GG,

New account-asset module is available in stable-extra. Can you check
> from there?
>
>
I have latest revision of stable-extra revno 4410, to the date,

I was trying to setup an active and when trying to set Initial Values
(button) this traceback
popped up.

Environment Information :
System : Linux-2.6.32-22-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-22-generic
Operating System Version : #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 5.0.10
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent
call last):
  File "/home/operador/5_10/server/bin/netsvc.py", line 247, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/operador/5_10/server/bin/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/home/operador/5_10/server/bin/service/web_services.py", line 633,
in execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File "/home/operador/5_10/server/bin/service/web_services.py", line 613,
in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/home/operador/5_10/server/bin/wizard/__init__.py", line 178, in
execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/home/operador/5_10/server/bin/wizard/__init__.py", line 73, in
execute_cr
    action_res = action(self, cr, uid, data, context)
  File
"/home/operador/5_10/server/bin/addons/account_asset/wizard/wizard_asset_initial.py",
line 79, in _asset_initial
    data['form']['acc_impairment'], data['form']['intervals_before'],
data['form']['name'], data['form']['note'], context)
  File
"/home/operador/5_10/server/bin/addons/account_asset/account_asset.py", line
284, in _initial
    base, expense, False, note, context)
  File
"/home/operador/5_10/server/bin/addons/account_asset/account_asset.py", line
774, in _history_line
    'note': str(note or ""),
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position
3: ordinal not in range(128)

====================
thanks in advance for your help,

Revision history for this message
Grzegorz Grzelak (OpenGLOBE.pl) (grzegorz-og.pl) wrote :

I cannot repeat this bug. Last line of bug trace says that it is a problem in character codes in note field which is of type Text. I have checked all my national characters in that field and it was no problem.

Something is telling me that such problem arise when you try to enter national characters directly in Python code in fields _(śęłćóꥌĆĘŁÓŻŹ). There are some texts for history which must be left in english fe. _(Parameters set to:). Translation for such field must be privided by usual translation tools in PO file. It is only suspection but can you tell me how did you translate texts appearing in notes of Initial values for history? (If did so at all).

Can you show me "Initial value" wizard window before you get this error?

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.