Apparently, if you try to process a voucher in a bank statement which does not have a partner set, there will be an error (see below). Creating a voucher without a partner is not blocked in the voucher module, though. Maybe a partner could just be made mandatory, also in the GUI.
openerp 7.0 - all up to date
Client Traceback (most recent call last):
File "/opt/openerp/server/openerp/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params)
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1083, in call_button
action = self._call_kw(req, model, method, args, {})
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1071, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/opt/openerp/server/openerp/addons/web/session.py", line 43, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/opt/openerp/server/openerp/addons/web/session.py", line 31, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/opt/openerp/server/openerp/addons/web/session.py", line 104, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/opt/openerp/server/openerp/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/opt/openerp/server/openerp/netsvc.py", line 295, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/server/openerp/service/web_services.py", line 614, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/server/openerp/osv/osv.py", line 169, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/server/openerp/osv/osv.py", line 123, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/server/openerp/osv/osv.py", line 179, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/server/openerp/osv/osv.py", line 166, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1497, in button_confirm_bank
return super(account_bank_statement, self).button_confirm_bank(cr, uid, ids, context=context)
File "/opt/openerp/server/openerp/addons/account/account_bank_statement.py", line 427, in button_confirm_bank
self.create_move_from_st_line(cr, uid, st_line.id, company_currency_id, st_line_number, context)
File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1519, in create_move_from_st_line
wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
File "/opt/openerp/server/openerp/workflow/wkf_service.py", line 119, in trg_validate
res2 = instance.validate(cr, id, ident, signal)
File "/opt/openerp/server/openerp/workflow/instance.py", line 43, in validate
workitem.process(cr, witem, ident, signal, force_running, stack=stack)
File "/opt/openerp/server/openerp/workflow/workitem.py", line 60, in process
ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
File "/opt/openerp/server/openerp/workflow/workitem.py", line 175, in _split_test
_join_test(cr, t[0], t[1], ident, stack)
File "/opt/openerp/server/openerp/workflow/workitem.py", line 183, in _join_test
create(cr,[activity], inst_id, ident, stack)
File "/opt/openerp/server/openerp/workflow/workitem.py", line 40, in create
process(cr, res, ident, stack=stack)
File "/opt/openerp/server/openerp/workflow/workitem.py", line 52, in process
result = _execute(cr, workitem, activity, ident, stack)
File "/opt/openerp/server/openerp/workflow/workitem.py", line 106, in _execute
returned_action = wkf_expr.execute(cr, ident, workitem, activity)
File "/opt/openerp/server/openerp/workflow/wkf_expr.py", line 67, in execute
return _eval_expr(cr, ident, workitem, activity['action'])
File "/opt/openerp/server/openerp/workflow/wkf_expr.py", line 57, in _eval_expr
ret = eval(line, env, nocopy=True)
File "/opt/openerp/server/openerp/tools/safe_eval.py", line 241, in safe_eval
return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
File "", line 1, in <module>
File "/opt/openerp/server/openerp/osv/orm.py", line 374, in function_proxy
return attr(self._cr, self._uid, [self._id], *args, **kwargs)
File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 830, in proforma_voucher
self.action_move_line_create(cr, uid, ids, context=context)
File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1303, in action_move_line_create
ml_writeoff = self.writeoff_move_line_get(cr, uid, voucher.id, line_total, move_id, name, company_currency, current_currency, context)
File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1230, in writeoff_move_line_get
account_id = voucher_brw.partner_id.property_account_payable.id
AttributeError: 'NoneType' object has no attribute 'id'
Apparently, if you try to process a voucher in a bank statement which does not have a partner set, there will be an error (see below). Creating a voucher without a partner is not blocked in the voucher module, though. Maybe a partner could just be made mandatory, also in the GUI.
openerp 7.0 - all up to date
Client Traceback (most recent call last): server/ openerp/ addons/ web/http. py", line 195, in dispatch "result" ] = method(self, **self.params) server/ openerp/ addons/ web/controllers /main.py" , line 1083, in call_button server/ openerp/ addons/ web/controllers /main.py" , line 1071, in _call_kw req.session. model(model) , method)(*args, **kwargs) server/ openerp/ addons/ web/session. py", line 43, in proxy execute_ kw(self. session. _db, self.session._uid, self.session. _password, self.model, method, args, kw) server/ openerp/ addons/ web/session. py", line 31, in proxy_method send(self. service_ name, method, *args) server/ openerp/ addons/ web/session. py", line 104, in send Fault(openerp. tools.ustr( e), formatted_info)
File "/opt/openerp/
response[
File "/opt/openerp/
action = self._call_kw(req, model, method, args, {})
File "/opt/openerp/
return getattr(
File "/opt/openerp/
result = self.proxy.
File "/opt/openerp/
result = self.session.
File "/opt/openerp/
raise xmlrpclib.
Server Traceback (most recent call last): server/ openerp/ addons/ web/session. py", line 90, in send netsvc. dispatch_ rpc(service_ name, method, args) server/ openerp/ netsvc. py", line 295, in dispatch_rpc getService( service_ name).dispatch( method, params) server/ openerp/ service/ web_services. py", line 614, in dispatch server/ openerp/ osv/osv. py", line 169, in execute_kw server/ openerp/ osv/osv. py", line 123, in wrapper server/ openerp/ osv/osv. py", line 179, in execute server/ openerp/ osv/osv. py", line 166, in execute_cr server/ openerp/ addons/ account_ voucher/ account_ voucher. py", line 1497, in button_confirm_bank bank_statement, self).button_ confirm_ bank(cr, uid, ids, context=context) server/ openerp/ addons/ account/ account_ bank_statement. py", line 427, in button_confirm_bank create_ move_from_ st_line( cr, uid, st_line.id, company_ currency_ id, st_line_number, context) server/ openerp/ addons/ account_ voucher/ account_ voucher. py", line 1519, in create_ move_from_ st_line service. trg_validate( uid, 'account.voucher', st_line. voucher_ id.id, 'proforma_voucher', cr) server/ openerp/ workflow/ wkf_service. py", line 119, in trg_validate validate( cr, id, ident, signal) server/ openerp/ workflow/ instance. py", line 43, in validate process( cr, witem, ident, signal, force_running, stack=stack) server/ openerp/ workflow/ workitem. py", line 60, in process 'split_ mode'], ident, signal, stack) server/ openerp/ workflow/ workitem. py", line 175, in _split_test server/ openerp/ workflow/ workitem. py", line 183, in _join_test cr,[activity] , inst_id, ident, stack) server/ openerp/ workflow/ workitem. py", line 40, in create server/ openerp/ workflow/ workitem. py", line 52, in process server/ openerp/ workflow/ workitem. py", line 106, in _execute execute( cr, ident, workitem, activity) server/ openerp/ workflow/ wkf_expr. py", line 67, in execute server/ openerp/ workflow/ wkf_expr. py", line 57, in _eval_expr server/ openerp/ tools/safe_ eval.py" , line 241, in safe_eval expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) server/ openerp/ osv/orm. py", line 374, in function_proxy server/ openerp/ addons/ account_ voucher/ account_ voucher. py", line 830, in proforma_voucher action_ move_line_ create( cr, uid, ids, context=context) server/ openerp/ addons/ account_ voucher/ account_ voucher. py", line 1303, in action_ move_line_ create move_line_ get(cr, uid, voucher.id, line_total, move_id, name, company_currency, current_currency, context) server/ openerp/ addons/ account_ voucher/ account_ voucher. py", line 1230, in writeoff_ move_line_ get brw.partner_ id.property_ account_ payable. id
File "/opt/openerp/
return openerp.
File "/opt/openerp/
result = ExportService.
File "/opt/openerp/
res = fn(db, uid, *params)
File "/opt/openerp/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/
return super(account_
File "/opt/openerp/
self.
File "/opt/openerp/
wf_
File "/opt/openerp/
res2 = instance.
File "/opt/openerp/
workitem.
File "/opt/openerp/
ok = _split_test(cr, workitem, activity[
File "/opt/openerp/
_join_test(cr, t[0], t[1], ident, stack)
File "/opt/openerp/
create(
File "/opt/openerp/
process(cr, res, ident, stack=stack)
File "/opt/openerp/
result = _execute(cr, workitem, activity, ident, stack)
File "/opt/openerp/
returned_action = wkf_expr.
File "/opt/openerp/
return _eval_expr(cr, ident, workitem, activity['action'])
File "/opt/openerp/
ret = eval(line, env, nocopy=True)
File "/opt/openerp/
return eval(test_
File "", line 1, in <module>
File "/opt/openerp/
return attr(self._cr, self._uid, [self._id], *args, **kwargs)
File "/opt/openerp/
self.
File "/opt/openerp/
ml_writeoff = self.writeoff_
File "/opt/openerp/
account_id = voucher_
AttributeError: 'NoneType' object has no attribute 'id'