AssertionError:错误的上下文传播 - OpenERP

时间:2014-08-07 12:42:17

标签: openerp assert stock

我得到" AssertionError:错误的上下文传播" openerp stock / wizard / stock_partial_picking.py文件中的错误。单击我的自定义交货订单上的交货按钮时出现此错误。以下是日志:

客户端回溯(最近一次调用最后一次):

  File "/opt/openerp/web/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/web/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/opt/openerp/web/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/web/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/web/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/web/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

服务器跟踪(最近一次呼叫最后):

  File "/opt/openerp/web/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/addons/stock/wizard/stock_partial_picking.py", line 115, in default_get
    assert active_model in ('stock.picking', 'stock.picking.in', 'stock.picking.out'), 'Bad context propagation'
AssertionError: Bad context propagation

1 个答案:

答案 0 :(得分:0)

上下文字典中必须有active_model个键,其值为'stock.picking''stock.picking.in''stock.picking.out'。您的自定义交货订单可能没有传递正确的值或根本没有传递任何值,但我没有办法在没有看到代码的情况下进一步提供帮助。

我不确定这是问这些问题的正确位置。尝试加入freenode上的irc chan #openobject,人们将能够帮助你。