ERROR: TypeError: 'bool' object is not iterable, when you are creating a new Purchase Invoice

Bug #497080 reported by Nhomar - Vauxoo
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Undecided
Unassigned

Bug Description

Simple to reproduce.
Financial Management > Invoices > Purchase Invoices > New Purchase Invoices.

Save the header, and try to add a line on web client....

ON THE SERVER LOG

[2009-12-15 09:18:13,732] ERROR:web-services:[01]:
[2009-12-15 09:18:13,736] ERROR:web-services:[02]: Environment Information :
[2009-12-15 09:18:13,739] ERROR:web-services:[03]: System : Linux-2.6.26-2-686-i686-with-debian-5.0.3
[2009-12-15 09:18:13,741] ERROR:web-services:[04]: OS Name : posix
[2009-12-15 09:18:13,744] ERROR:web-services:[05]: Distributor ID: Debian
[2009-12-15 09:18:13,747] ERROR:web-services:[06]: Description: Debian GNU/Linux 5.0.3 (lenny)
[2009-12-15 09:18:13,749] ERROR:web-services:[07]: Release: 5.0.3
[2009-12-15 09:18:13,751] ERROR:web-services:[08]: Codename: lenny
[2009-12-15 09:18:13,758] ERROR:web-services:[09]: Operating System Release : 2.6.26-2-686
[2009-12-15 09:18:13,758] ERROR:web-services:[10]: Operating System Version : #1 SMP Wed Aug 19 06:06:52 UTC 2009
[2009-12-15 09:18:13,758] ERROR:web-services:[11]: Operating System Architecture : 32bit
[2009-12-15 09:18:13,759] ERROR:web-services:[12]: Operating System Locale : es_VE.UTF8
[2009-12-15 09:18:13,759] ERROR:web-services:[13]: Python Version : 2.5.2
[2009-12-15 09:18:13,759] ERROR:web-services:[14]: OpenERP-Server Version : 5.0.7
[2009-12-15 09:18:13,760] ERROR:web-services:[15]: Last revision No. & ID : 1914 <email address hidden>
[2009-12-15 09:18:13,765] ERROR:web-services:[16]:
[2009-12-15 09:18:13,787] ERROR:web-services:[17]: Traceback (most recent call last):
[2009-12-15 09:18:13,790] ERROR:web-services:[18]: File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/osv.py", line 61, in wrapper
[2009-12-15 09:18:13,792] ERROR:web-services:[19]: return f(self, dbname, *args, **kwargs)
[2009-12-15 09:18:13,794] ERROR:web-services:[20]: File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/osv.py", line 120, in execute
[2009-12-15 09:18:13,797] ERROR:web-services:[21]: res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
[2009-12-15 09:18:13,799] ERROR:web-services:[22]: File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/osv.py", line 112, in execute_cr
[2009-12-15 09:18:13,801] ERROR:web-services:[23]: return getattr(object, method)(cr, uid, *args, **kw)
[2009-12-15 09:18:13,803] ERROR:web-services:[24]: File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/orm.py", line 2069, in default_get
[2009-12-15 09:18:13,805] ERROR:web-services:[25]: value[f] = self._defaults[f](self, cr, uid, context)
[2009-12-15 09:18:13,807] ERROR:web-services:[26]: File "/home/nhomar/openerp/stable/5.0/server-new/bin/addons/account/invoice.py", line 976, in _price_unit_default
[2009-12-15 09:18:13,813] ERROR:web-services:[27]: for l in context.get('invoice_line', {}):
[2009-12-15 09:18:13,814] ERROR:web-services:[28]: TypeError: 'bool' object is not iterable

ON WEB CLIENT LOG

  File "/home/nhomar/openerp/stable/5.0/server-new/bin/service/web_services.py", line 597, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/osv.py", line 61, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/osv.py", line 120, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/osv.py", line 112, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/nhomar/openerp/stable/5.0/server-new/bin/osv/orm.py", line 2069, in default_get
    value[f] = self._defaults[f](self, cr, uid, context)
  File "/home/nhomar/openerp/stable/5.0/server-new/bin/addons/account/invoice.py", line 976, in _price_unit_default
    for l in context.get('invoice_line', {}):
TypeError: 'bool' object is not iterable

ON GTK CLIENT WORKS FINE

gtk client revno: 1027
webclient revno: 2770
server revno: 1914

Thanks....

Related branches

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

Hello,

Its fixed in stable. Please update your code.

Revision Info:
2772 <email address hidden>

Thanks.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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