Can not add a new invoice line in supplier invoice if you have saved it before

Bug #497365 reported by Santi Argüeso(Pexego)
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Undecided
Sananaz (Open ERP)

Bug Description

You can add new supplier invoice lines without problem, but if you save the invoice and then try to add a new line there is an error and you can not add any new line

web-client revno 2772

Log web-client

[16/Dec/2009:11:55:47] HTTP Traceback (most recent call last):
  File "/srv/openerp/launchpad/5.0/client-web/lib/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/srv/openerp/launchpad/5.0/client-web/lib/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/controllers/base.py", line 130, in wrapper
    return fn(*args, **kw)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/tools/expose.py", line 204, in func_wrapper
    res = func(*args, **kw)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/controllers/listgrid.py", line 167, in get
    return dict(ids=ids, count=count, view=ustr(wid.render()), info=info)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/widgets/base/base.py", line 196, in render
    return self.display(value, **params)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/widgets/listgrid.py", line 266, in display
    defaults = proxy.default_get(fields, ctx)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/rpc.py", line 390, in <lambda>
    return lambda *args: self._session.execute("object", "execute", self._resource, name, *args)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/rpc.py", line 351, in execute
    return self.gateway.execute(obj, method, *args)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/rpc.py", line 153, in execute
    return self.__execute(obj, method, args)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/rpc.py", line 139, in __execute
    raise common.error(_('Application Error!'), err.backtrace)
  File "/srv/openerp/launchpad/5.0/client-web/openerp/common.py", line 72, in error
    raise TinyError(message=msg, title=title or _("Error"))
TinyError: Traceback (most recent call last):
  File "/srv/openerp/launchpad/5.0/server/bin/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/srv/openerp/launchpad/5.0/server/bin/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/srv/openerp/launchpad/5.0/server/bin/service/web_services.py", line 597, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/srv/openerp/launchpad/5.0/server/bin/osv/osv.py", line 61, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/srv/openerp/launchpad/5.0/server/bin/osv/osv.py", line 120, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/srv/openerp/launchpad/5.0/server/bin/osv/osv.py", line 112, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/srv/openerp/launchpad/5.0/server/bin/osv/orm.py", line 2069, in default_get
    value[f] = self._defaults[f](self, cr, uid, context)
  File "/srv/openerp/launchpad/5.0/server/bin/addons/account_tax_include/invoice_tax_incl.py", line 101, in _price_unit_default
    return super(account_invoice_line, self)._price_unit_default(cr, uid, context)
  File "/srv/openerp/launchpad/5.0/server/bin/addons/account/invoice.py", line 982, in _price_unit_default
    if len(taxes[0]) >= 3 and taxes[0][2]:
IndexError: list index out of range

Log server:
[2009-12-16 11:55:47,428] ERROR:web-services:[01]:
[2009-12-16 11:55:47,428] ERROR:web-services:[02]: Environment Information :
[2009-12-16 11:55:47,428] ERROR:web-services:[03]: System : Linux-2.6.28-17-generic-x86_64-with-Ubuntu-9.04-jaunty
[2009-12-16 11:55:47,428] ERROR:web-services:[04]: OS Name : posix
[2009-12-16 11:55:47,428] ERROR:web-services:[05]: Distributor ID: Ubuntu
[2009-12-16 11:55:47,428] ERROR:web-services:[06]: Description: Ubuntu 9.04
[2009-12-16 11:55:47,429] ERROR:web-services:[07]: Release: 9.04
[2009-12-16 11:55:47,429] ERROR:web-services:[08]: Codename: jaunty
[2009-12-16 11:55:47,429] ERROR:web-services:[09]: Operating System Release : 2.6.28-17-generic
[2009-12-16 11:55:47,429] ERROR:web-services:[10]: Operating System Version : #58-Ubuntu SMP Tue Dec 1 21:27:25 UTC 2009
[2009-12-16 11:55:47,429] ERROR:web-services:[11]: Operating System Architecture : 64bit
[2009-12-16 11:55:47,429] ERROR:web-services:[12]: Operating System Locale : es_ES.UTF8
[2009-12-16 11:55:47,429] ERROR:web-services:[13]: Python Version : 2.6.2
[2009-12-16 11:55:47,429] ERROR:web-services:[14]: OpenERP-Server Version : 5.0.7
[2009-12-16 11:55:47,429] ERROR:web-services:[15]: Last revision No. & ID : 1914 <email address hidden>
[2009-12-16 11:55:47,429] ERROR:web-services:[16]:
[2009-12-16 11:55:47,429] ERROR:web-services:[17]: Traceback (most recent call last):
[2009-12-16 11:55:47,430] ERROR:web-services:[18]: File "/srv/openerp/launchpad/5.0/server/bin/osv/osv.py", line 61, in wrapper
[2009-12-16 11:55:47,430] ERROR:web-services:[19]: return f(self, dbname, *args, **kwargs)
[2009-12-16 11:55:47,430] ERROR:web-services:[20]: File "/srv/openerp/launchpad/5.0/server/bin/osv/osv.py", line 120, in execute
[2009-12-16 11:55:47,430] ERROR:web-services:[21]: res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
[2009-12-16 11:55:47,430] ERROR:web-services:[22]: File "/srv/openerp/launchpad/5.0/server/bin/osv/osv.py", line 112, in execute_cr
[2009-12-16 11:55:47,430] ERROR:web-services:[23]: return getattr(object, method)(cr, uid, *args, **kw)
[2009-12-16 11:55:47,430] ERROR:web-services:[24]: File "/srv/openerp/launchpad/5.0/server/bin/osv/orm.py", line 2069, in default_get
[2009-12-16 11:55:47,430] ERROR:web-services:[25]: value[f] = self._defaults[f](self, cr, uid, context)
[2009-12-16 11:55:47,430] ERROR:web-services:[26]: File "/srv/openerp/launchpad/5.0/server/bin/addons/account_tax_include/invoice_tax_incl.py", line 101, in _price_unit_default
[2009-12-16 11:55:47,430] ERROR:web-services:[27]: return super(account_invoice_line, self)._price_unit_default(cr, uid, context)
[2009-12-16 11:55:47,431] ERROR:web-services:[28]: File "/srv/openerp/launchpad/5.0/server/bin/addons/account/invoice.py", line 982, in _price_unit_default
[2009-12-16 11:55:47,431] ERROR:web-services:[29]: if len(taxes[0]) >= 3 and taxes[0][2]:
[2009-12-16 11:55:47,431] ERROR:web-services:[30]: IndexError: list index out of range

Changed in openobject-client-web:
status: New → Confirmed
affects: openobject-client-web → openobject-addons
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thank you for your concern.

It has been corrected by revision 2498 <email address hidden>.

Changed in openobject-addons:
status: Confirmed → Fix Released
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Hi Jay,

I don't like this patch because you fix the problem in the account addon and not in the etiny client.

Ask to Amit to fix this bug.

Thank you so much !

Changed in openobject-addons:
status: Fix Released → Confirmed
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

I reverted your code :/

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Stephane,

Yes, it was just to avoid problems, but now it has been fixed on eTiny. Some testing is going on and sooner it will be released.

Thank you.

affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
assignee: nobody → sma (Tiny) (sma-tiny)
Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello,

Its fixed in stable. Please update your code.

Revision Info:
2784 <email address hidden>

Thanks.

Changed in openobject-client-web:
status: Confirmed → Fix Committed
Changed in openobject-client-web:
status: Fix Committed → Fix Released
milestone: none → 5.0.11
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.