unable to create invoice from sale order with latest revisions

Bug #324192 reported by Naresh(OpenERP)
2
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

hello,
I am on latest trunk revisions.
I am not able to create invoice after confirming the sale order. it gives me this....
I think the context is set to None instead of {} .
i have attached a patch too.

Traceback (most recent call last):
  File "/home/nch/openERP/latest/server/bin/netsvc.py", line 229, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/nch/openERP/latest/server/bin/netsvc.py", line 74, in __call__
    return getattr(self, method)(*params)
  File "/home/nch/openERP/latest/server/bin/service/web_services.py", line 475, in exec_workflow
    res = service.exec_workflow(db, uid, object, method, id)
  File "/home/nch/openERP/latest/server/bin/osv/osv.py", line 59, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/nch/openERP/latest/server/bin/osv/osv.py", line 137, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, method, *args)
  File "/home/nch/openERP/latest/server/bin/osv/osv.py", line 130, in exec_workflow_cr
    return wf_service.trg_validate(uid, obj, args[0], method, cr)
  File "/home/nch/openERP/latest/server/bin/workflow/wkf_service.py", line 81, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/home/nch/openERP/latest/server/bin/workflow/instance.py", line 49, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/home/nch/openERP/latest/server/bin/workflow/workitem.py", line 62, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/home/nch/openERP/latest/server/bin/workflow/workitem.py", line 171, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/home/nch/openERP/latest/server/bin/workflow/workitem.py", line 179, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/home/nch/openERP/latest/server/bin/workflow/workitem.py", line 42, in create
    process(cr, res, ident, stack=stack)
  File "/home/nch/openERP/latest/server/bin/workflow/workitem.py", line 54, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/home/nch/openERP/latest/server/bin/workflow/workitem.py", line 126, in _execute
    id_new = wkf_expr.execute(cr, ident, workitem, activity)
  File "/home/nch/openERP/latest/server/bin/workflow/wkf_expr.py", line 68, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/home/nch/openERP/latest/server/bin/workflow/wkf_expr.py", line 58, in _eval_expr
    ret = eval(line, env)
  File "<string>", line 0, in ?
  File "/home/nch/openERP/latest/server/bin/osv/orm.py", line 153, in <lambda>
    return lambda *args, **argv: getattr(self._table, name)(self._cr, self._uid, [self._id], *args, **argv)
  File "/home/nch/openERP/latest/addons/sale/sale.py", line 417, in action_invoice_create
    res = self._make_invoice(cr, uid, order, il)
  File "/home/nch/openERP/latest/addons/sale/sale.py", line 383, in _make_invoice
    inv_obj.button_compute(cr, uid, [inv_id])
  File "/home/nch/openERP/latest/addons/account/invoice.py", line 445, in button_compute
    self.button_reset_taxes(cr, uid, ids, context)
  File "/home/nch/openERP/latest/addons/account/invoice.py", line 436, in button_reset_taxes
    context.update({'lang': partner.lang})
AttributeError: 'NoneType' object has no attribute 'update'

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :
Changed in openobject-addons:
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.