采购管理中的“供应商审核通过”报错(开票方式:源于订单)
-
采购管理中的“供应商审核通过”报错(开票方式:源于订单)
如果开票方式选择源于收发货单,就不会报错,但在收货后“创建发票”时报错
总之:创建发票会报错global name 'line' is not defined,不知道是哪里没有设置的原因?Traceback (most recent call last):
File "netsvc.pyo", line 330, in run
File "serviceweb_services.pyo", line 360, in exec_workflow
File "osvosv.pyo", line 129, in exec_workflow
File "osvosv.pyo", line 122, in exec_workflow_cr
File "workflowwkf_service.pyo", line 86, in trg_validate
File "workflowinstance.pyo", line 53, in validate
File "workflowworkitem.pyo", line 64, in process
File "workflowworkitem.pyo", line 161, in _split_test
File "workflowworkitem.pyo", line 169, in _join_test
File "workflowworkitem.pyo", line 48, in create
File "workflowworkitem.pyo", line 64, in process
File "workflowworkitem.pyo", line 161, in _split_test
File "workflowworkitem.pyo", line 169, in _join_test
File "workflowworkitem.pyo", line 48, in create
File "workflowworkitem.pyo", line 57, in process
File "workflowworkitem.pyo", line 118, in _execute
File "workflowwkf_expr.pyo", line 87, in execute
File "workflowwkf_expr.pyo", line 83, in _eval_expr File "", line 1, in
File "workflowwkf_expr.pyo", line 43, in call
File "osvosv.pyo", line 92, in execute_cr
File "D:Tiny_ERP4.2.1Tiny ERP Serveraddonspurchasepurchase.py", line 195, in action_invoice_create NameError: global name 'line' is not defined -
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/tinyerp-server/netsvc.py", line 330, in run r=m(*msg[2:])
File "/usr/lib/python2.5/site-packages/tinyerp-server/service/web_services.py", line 360, in exec_workflow res = service.exec_workflow(db, uid, object, method, id) File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/osv.py", line 129, in exec_workflow res = self.exec_workflow_cr(cr, uid, obj, method, *args) File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/osv.py", line 122, in exec_workflow_cr wf_service.trg_validate(uid, obj, args[0], method, cr) File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/wkf_service.py", line 86, in trg_validate instance.validate(cr, id, ident, signal) File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/instance.py", line 53, in validate workitem.process(cr, witem, ident, signal, force_running) File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 64, in process ok = _split_test(cr, workitem, activity['split_mode'], ident, signal)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 161, in _split_test _join_test(cr, t[0], t[1], ident)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 169, in _join_test create(cr,[activity], inst_id, ident)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 48, in create process(cr, res, ident)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 64, in process ok = _split_test(cr, workitem, activity['split_mode'], ident, signal)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 161, in _split_test _join_test(cr, t[0], t[1], ident)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 169, in _join_test create(cr,[activity], inst_id, ident)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 48, in create process(cr, res, ident)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 57, in process if not _execute(cr, workitem, activity, ident):
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/workitem.py", line 118, in _execute id_new = wkf_expr.execute(cr, ident, workitem, activity)
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/wkf_expr.py", line 87, in execute return _eval_expr(cr, ident, workitem, activity['action'])
File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/wkf_expr.py", line 83, in _eval_expr ret = eval(line, env)
File "", line 1, in File "/usr/lib/python2.5/site-packages/tinyerp-server/workflow/wkf_expr.py", line 43, in call return self.wf_service.execute_cr(*arg) File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/osv.py", line 92, in execute_cr res = getattr(object,method)(cr, uid, *args, **kw) File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/purchase/purchase.py", line 195, in action_invoice_create raise osv.except_osv('Error !', 'There is no expense account defined for this product: "%s" (id:%d)' % (line.product_id.name, line.product_id.id,)) NameError: global name 'line' is not defined[[i] 本帖最后由 liuyuan_jq 于 2008-3-5 10:30 编辑 [/i]]
-
感谢你的报告,请告诉一下你测试的Tiny服务器的版本,我们的测试组将跟进测试。
-
www.tinyerp.org/forum/viewtopic.php?t=4978&view=previous&sid=303383092d45197a747f4d2a26dca7b4
[size=99px]我发现错误的原因是我安装了hr_expense模块,这会导致[/size][b][size=99px]expenses workflow doesn't work properly
[/size][/b]
[size=99px]这可能需要在工作流Purchase Order Basic Workflow中添加expense,不过工作流暂时看不懂,^_^[/size]