当我尝试验证发票时,我收到了异常
ValueError: "Invalid field 'type' in leaf "<osv.ExtendedLeaf: ('type', '=', 'sale') on account_move_line (ctx: )>"" while evaluating
u'action_move_create()'
有人能给我一个关于在哪里看的线索吗?
非常感谢提前!
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 307, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 803, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 403, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 955, in exec_workflow
return request.session.exec_workflow(model, id, signal)
File "/opt/odoo/openerp/http.py", line 1111, in exec_workflow
r = self.proxy('object').exec_workflow(self.db, self.uid, self.password, model, signal, id)
File "/opt/odoo/openerp/http.py", line 879, in proxy_method
result = dispatch_rpc(self.service_name, method, args)
File "/opt/odoo/openerp/http.py", line 115, in dispatch_rpc
result = dispatch(method, params)
File "/opt/odoo/openerp/service/model.py", line 37, in dispatch
res = fn(db, uid, *params)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 188, in exec_workflow
return exec_workflow_cr(cr, uid, obj, signal, *args)
File "/opt/odoo/openerp/service/model.py", line 182, in exec_workflow_cr
return execute_cr(cr, uid, obj, 'signal_workflow', [res_id], signal)[res_id]
File "/opt/odoo/openerp/service/model.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 3570, in signal_workflow
result[res_id] = workflow.trg_validate(uid, self._name, res_id, signal, cr)
File "/opt/odoo/openerp/workflow/__init__.py", line 85, in trg_validate
return WorkflowService.new(cr, uid, res_type, res_id).validate(signal)
File "/opt/odoo/openerp/workflow/service.py", line 91, in validate
res2 = wi.validate(signal)
File "/opt/odoo/openerp/workflow/instance.py", line 75, in validate
wi.process(signal=signal, force_running=force_running, stack=stack)
File "/opt/odoo/openerp/workflow/workitem.py", line 120, in process
ok = self._split_test(activity['split_mode'], signal, stack)
File "/opt/odoo/openerp/workflow/workitem.py", line 248, in _split_test
self._join_test(t[0], t[1], stack)
File "/opt/odoo/openerp/workflow/workitem.py", line 257, in _join_test
WorkflowItem.create(self.session, self.record, activity, inst_id, stack=stack)
File "/opt/odoo/openerp/workflow/workitem.py", line 95, in create
workflow_item.process(stack=stack)
File "/opt/odoo/openerp/workflow/workitem.py", line 116, in process
if not self._execute(activity, stack):
File "/opt/odoo/openerp/workflow/workitem.py", line 162, in _execute
returned_action = self.wkf_expr_execute(activity)
File "/opt/odoo/openerp/workflow/workitem.py", line 313, in wkf_expr_execute
return self.wkf_expr_eval_expr(activity['action'])
File "/opt/odoo/openerp/workflow/workitem.py", line 291, in wkf_expr_eval_expr
result = eval(line, env, nocopy=True)
File "/opt/odoo/openerp/tools/safe_eval.py", line 314, in safe_eval
return eval(c, globals_dict, locals_dict)
File "", line 1, in <module>
File "/opt/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/addons/account/account_invoice.py", line 919, in action_move_create
move = account_move.with_context(ctx_nolang).create(move_vals)
File "/opt/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 481, in new_api
result = method(self._model, cr, uid, *args, **kwargs)
File "/opt/odoo/addons/account/account.py", line 1407, in create
tmp = self.validate(cr, uid, [result], context)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/addons/account/account.py", line 1628, in validate
obj_move_line.create_analytic_lines(cr, uid, [line.id for line in record.line_id], context)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/addons/hr_timesheet_invoice/hr_timesheet_invoice.py", line 361, in create_analytic_lines
res = super(account_move_line, self).create_analytic_lines(cr, uid, ids,context=context)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/addons/account/account_move_line.py", line 199, in create_analytic_lines
if obj_line.analytic_lines:
File "/opt/odoo/openerp/fields.py", line 819, in __get__
self.determine_value(record)
File "/opt/odoo/openerp/fields.py", line 912, in determine_value
record._prefetch_field(self)
File "/opt/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 3241, in _prefetch_field
result = records.read(list(fnames), load='_classic_write')
File "/opt/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 3178, in read
self._read_from_database(stored, inherited)
File "/opt/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 3365, in _read_from_database
res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
File "/opt/odoo/openerp/osv/fields.py", line 778, in get
records = comodel.search(domain, limit=self._limit)
File "/opt/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 481, in new_api
result = method(self._model, cr, uid, *args, **kwargs)
File "/opt/odoo/addons/account/account_analytic_line.py", line 54, in search
order, context=context, count=count)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 1645, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 4673, in _search
self._apply_ir_rules(cr, user, query, 'read', context=context)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 4538, in _apply_ir_rules
rule_where_clause, rule_where_clause_params, rule_tables = rule_obj.domain_get(cr, uid, self._name, mode, context=context)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get
query = self.pool[model_name]._where_calc(cr, SUPERUSER_ID, dom, active_test=False)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 4483, in _where_calc
e = expression.expression(cr, user, domain, self, context)
File "/opt/odoo/openerp/osv/expression.py", line 657, in __init__
self.parse(cr, uid, context=context)
File "/opt/odoo/openerp/osv/expression.py", line 858, in parse
right_ids = comodel.search(cr, uid, [(path[1], operator, right)], context=context)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/addons/account/account_move_line.py", line 769, in search
return super(account_move_line, self).search(cr, uid, args, offset, limit, order, context, count)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 1645, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 4672, in _search
query = self._where_calc(cr, user, args, context=context)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 4483, in _where_calc
e = expression.expression(cr, user, domain, self, context)
File "/opt/odoo/openerp/osv/expression.py", line 657, in __init__
self.parse(cr, uid, context=context)
File "/opt/odoo/openerp/osv/expression.py", line 823, in parse
raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: "Invalid field 'type' in leaf "<osv.ExtendedLeaf: ('type', '=', 'sale') on account_move_line (ctx: )>"" while evaluating
u'action_move_create()'