Unnecessary tries to browse a rescord even if ID after all is being used

Bug #537294 reported by sraps (Alistek)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Account Banking Framework
Fix Released
Critical
Pieter J. Kersten (EduSense BV)

Bug Description

Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/openerp-server/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.4/site-packages/openerp-server/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/python2.4/site-packages/openerp-server/service/web_services.py", line 632, in execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File "/usr/lib/python2.4/site-packages/openerp-server/service/web_services.py", line 612, in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/usr/lib/python2.4/site-packages/openerp-server/wizard/__init__.py", line 178, in execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/usr/lib/python2.4/site-packages/openerp-server/wizard/__init__.py", line 73, in execute_cr
    action_res = action(self, cr, uid, data, context)
  File "/var/openerp-server/custom_addons/account_banking/wizard/bank_import.py", line 458, in _banking_import_statements_file
    partner_id = get_or_create_partner(
  File "/var/openerp-server/custom_addons/account_banking/wizard/banktools.py", line 136, in get_or_create_partner
    return partner_obj.browse(cursor, uid, partner_id)[0]
  File "/usr/lib/python2.4/site-packages/openerp-server/osv/orm.py", line 166, in __getitem__
    elif hasattr(self._table, name):
TypeError: hasattr(): attribute name must be string

Problem lies in that "partner_id" should be supplied as a one element list, nevertheless...
Browsing for partner record, while after the call everywhere is being expected only integer not object, will create many additional errors, so "partner_id" should be returned as it is - as integer.

Related branches

Changed in account-banking:
importance: Undecided → Critical
Changed in account-banking:
status: New → Confirmed
assignee: nobody → Pieter J. Kersten (EduSense BV) (pieterj)
Changed in account-banking:
status: Confirmed → Fix Committed
Changed in account-banking:
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.