[6.0.2 rev 4591/4592] TypeError: 'int' object is unsubscriptable

Bug #772451 reported by Thomas Winteler (Win-Soft)
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP Publisher's Warranty Team

Bug Description

Hey all

bzr revision 4591/4592

How to reproduce:
Accounting / Journal Entries / Journal Entries
. Create new Journal Entry
. Create new Journal Item: Enter Name, Account, Debit and press Enter
. Error:
Traceback (most recent call last):
  File "/opt/openerp/development/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/development/server/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/development/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/development/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/development/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/development/server/bin/addons/account/account_move_line.py", line 158, in default_get
    data = self._default_get(cr, uid, fields, context=context)
  File "/opt/openerp/development/server/bin/addons/account/account_move_line.py", line 230, in _default_get
    if i[2]:
TypeError: 'int' object is unsubscriptable

. Close Error message
. Click into Reference field of the new journal Item and press ESC
. Journal Item will be generated
. Click on new (Journal Item) same error comes up

After first error message "Loading" bar on top stays open

regards
thomi

Tags: maintenance

Related branches

summary: - TypeError: 'int' object is unsubscriptable
+ [6.0.2 rev 4591/4592] TypeError: 'int' object is unsubscriptable
Changed in openobject-client-web:
status: New → Confirmed
importance: Undecided → Medium
affects: openobject-client-web → openobject-addons
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello,

I have checked the issue in latest addons/server/client/web.
I am getting same error in web-client only not in gtk. In Gtk-client it works fine.
And the problem i think the passing of context for o2m field is not same as Gtk-client passed.

In Web-client:
print context['lines'] => [24]

And in Gtk-client
print context['lines'] =>
[(0, 0, {'analytic_account_id': False, 'tax_code_id': False, 'tax_amount': False, 'account_id': 9, 'ref': False, 'currency_id': False, 'credit': False, 'state': 'draft', 'date_maturity': False, 'invoice': False, 'debit': 100.0, 'amount_currency': False, 'partner_id': False, 'reconcile_id': False, 'reconcile_partial_id': False, 'name': 'sale'}), (2, 28, False), (2, 27, False), (2, 26, False), (2, 25, False), (2, 22, False), (2, 21, False), (2, 20, False), (2, 19, False)].

So need to check by Webclient team.

Thank you,
mra

affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → nobody
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Hey

Any progress in this issue? People can't create new Journal Items...!!

Thanks for response
thomi

affects: openobject-client-web → openobject-addons
Changed in openobject-addons:
assignee: OpenERP SA's Web Client R&D (openerp-dev-web) → nobody
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Fix Committed
milestone: none → 6.0.3
tags: added: maintenance
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
conexus.at (conexus.at) wrote :

Hello,

I'm not sure if the Fix solves the Problem, at least for me it doesn't.

Could someone please confirm this:

Example:
- A Journal with Default Credit Account = 4000, Default Debit Account = 4000

Then add a new Journal Item using the above Journal

In v6.0.2:
GTK Client = OK:
Add an Account (2700), a Name and the Credit with 10.0, press ENTER -> A Counterpart Entry with Account 4000 and Debit 10.0 is created.

WEB Client = wrong:
Add an Account (2700), a Name and the Credit with 10.0, press ENTER or the SAVE Icon -> Counterpart Entry is not created

In v6.0.3:
GTK Client = OK:
Add an Account (2700), a Name and the Credit with 10.0, press ENTER -> A Counterpart Entry with Account 4000 and Debit 10.0 is created.

WEB Client = wrong:
Add an Account (2700), a Name and the Credit with 10.0, press ENTER or the SAVE Icon -> Counterpart Entry is not created

If I instead create a Journal Entry, a Counterpart Entry is created, but:
Manually created Journal Item: name: test, account = 2700, credit = 10.0
Counterpart Journal Item: name: test, account = 2700, debit = 10.0
The Account of the Counterpart Journal Item should be 4000 and not 2700!

with kind regards,
Sven

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.