← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 691810] Re: Cannot cancel invoice BUG

 

** Branch linked: lp:~openerp-dev/openobject-addons/pso-dev-addons3

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/691810

Title:
  Cannot cancel invoice BUG

Status in OpenObject Addons Modules:
  Fix Committed

Bug description:
  When I click Cancel Button in Account Invoice Form then getting errors:

File "/home/jacara/Pydev-workspace/monoserp/osv/orm.py", line 179, in <lambda>
    return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
  File "/home/jacara/Pydev-workspace/monoserp/addons/account/invoice.py", line 1037, in action_cancel
    account_move_obj.unlink(cr, uid, [i['move_id'][0]])
  File "/home/jacara/Pydev-workspace/monoserp/addons/account/account.py", line 1286, in unlink
    context['journal_id'] = move.journal_id.id
TypeError: 'NoneType' object does not support item assignment


-----------------

My suggest :

if context is None :
    context = {}





References