← Back to team overview

openerp-india team mailing list archive

[Bug 947355] Re: [6.1, account] reconciliation _defaults function for 'name' needs to be called with context argument

 

** Changed in: therp-backports
       Status: Fix Committed => Fix Released

** No longer affects: therp-backports

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/947355

Title:
  [6.1, account] reconciliation _defaults function for 'name' needs to
  be called with context argument

Status in OpenERP Addons (modules):
  Fix Released

Bug description:
  Hi,

  the function that provides the default name for account.reconcile is
  called without the context argument in account/account.py", line 1655.
  Somewhere down the line, the account module's ir_sequence does a
  context.get() without checking whether context is perhaps None and it
  all ends in tears.

    File "/home/oerinttst61/openobject-addons/account/account.py", line 1655, in<lambda>
      'name': lambda self,cr,uid,ctx={}: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile') or '/',
    File "/home/oerinttst61/openobject-server/openerp/addons/base/ir/ir_sequence.py", line 256, in get
      return self.get_id(cr, uid, code, 'code', context)
    File "/home/oerinttst61/openobject-server/openerp/addons/base/ir/ir_sequence.py", line 248, in get_id
      return self.next_by_code(cr, uid, sequence_code_or_id, context)
    File "/home/oerinttst61/openobject-server/openerp/addons/base/ir/ir_sequence.py", line 233, in next_by_code
      return self._next(cr, uid, ids, context)
    File "/home/oerinttst61/openobject-addons/account/ir_sequence.py", line 53, in _next
      if line.fiscalyear_id.id == context.get('fiscalyear_id'):
  AttributeError: 'NoneType' object has no attribute 'get'

  Cheers,
  Stefan.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/947355/+subscriptions


References