← 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

 

Stefan's fix was merged in 6.1 at revision [1], so the issue should be
fixed now.

Thanks for reporting and taking the time to submit a proper patch!

[1] addons rev. 6696 rev-id:
odo@xxxxxxxxxxx-20120322122419-xt6rlz330bkdo8ox

** Changed in: openobject-addons
   Importance: Undecided => Medium

** Changed in: openobject-addons
       Status: New => Fix Released

** Changed in: openobject-addons
    Milestone: None => 6.1

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP R&D Addons Team 3 (openerp-dev-addons3)

-- 
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
Status in Therp Backports:
  Fix Committed

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