[7.0][6.1][account_chart_update] Wrong dict passed in function to that leads to TypeError

Bug #1255543 reported by Yann Papouin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Account - Financial Tools
Fix Released
Undecided
Yann Papouin

Bug Description

I'm testing 6.1 but since this part of the code didn't change in 7.0, it should also happens in both versions.
The problem comes from "action_update_records", the wrong dict is passed in _update_accounts so tax_template_mapping = taxes_res['pending']. That's wrong, it should be taxes_res['mapping']

        accounts_res = self._update_accounts(
            cr, uid, wizard, log, taxes_res['pending'], context=context)

        accounts_res = self._update_accounts(
            cr, uid, wizard, log, taxes_res['mapping'], context=context)

For the record:

Server Traceback (most recent call last):
  File "/web/addons/web/common/http.py", line 593, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/server/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/server/openerp/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/server/openerp/osv/osv.py", line 186, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/server/openerp/osv/osv.py", line 129, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/server/openerp/osv/osv.py", line 195, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/server/openerp/osv/osv.py", line 183, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/addons-account-financial-tools/account_chart_update/account.py", line 1272, in action_update_records
    self._update_taxes_pending_for_accounts(cr, uid, wizard, log, taxes_res['pending'], accounts_res['mapping'], context=context)
  File "/addons-account-financial-tools/account_chart_update/account.py", line 1114, in _update_taxes_pending_for_accounts
    if value['account_collected_id']:
TypeError: 'int' object has no attribute '__getitem__'

Related branches

Changed in account-financial-tools:
assignee: nobody → Yann Papouin (yann-papouin)
Changed in account-financial-tools:
status: New → 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.