Odoo中文社区可以通过以下三个域名访问:shine-it.net , odoocn.org,odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

求助大神,自定义字段不存在的错误要怎么删除。谢谢!



  • 大家好,

    odoo 日志里面提示我自定义的字段不存在,这个错误是需要在哪里修正呢?谢谢!

    2017-11-28 07:16:08,297 20345 INFO odoo_db openerp.modules.loading: loading 1 modules...
    2017-11-28 07:16:08,762 20345 INFO odoo_db openerp.modules.loading: 1 modules loaded in 0.46s, 0 queries
    2017-11-28 07:16:08,949 20345 INFO odoo_db openerp.modules.loading: loading 72 modules...
    2017-11-28 07:16:11,275 20345 INFO odoo_db openerp.modules.module: module hr_holidays: creating or updating database tables
    2017-11-28 07:16:11,539 20345 INFO odoo_db openerp.modules.loading: loading hr_holidays/security/ir.model.access.csv
    2017-11-28 07:16:11,630 20345 INFO odoo_db openerp.modules.loading: loading hr_holidays/security/ir_rule.xml
    2017-11-28 07:16:11,674 20345 INFO odoo_db openerp.modules.loading: loading hr_holidays/hr_holidays_workflow.xml
    2017-11-28 07:16:11,745 20345 INFO odoo_db openerp.modules.loading: loading hr_holidays/hr_holidays_view.xml
    2017-11-28 07:16:12,552 20345 ERROR odoo_db openerp.addons.base.ir.ir_ui_view: Field x_graduated_from does not exist

    Error context:
    View hr.employee.leave.form.inherit
    [view_id: 844, xml_id: hr_holidays.view_employee_form_leave_inherit, model: hr.employee, parent_id: 812]
    2017-11-28 07:16:12,558 20345 INFO odoo_db werkzeug: 127.0.0.1 - - [28/Nov/2017 07:16:12] "POST /calendar/notify HTTP/1.0" 500 -
    2017-11-28 07:16:12,583 20345 ERROR odoo_db werkzeug: Error on request:
    Traceback (most recent call last):
    File "/usr/share/pyshared/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
    File "/usr/share/pyshared/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
    File "/usr/lib/python2.7/dist-packages/openerp/service/server.py", line 280, in app return self.app(e, s)
    25692 File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 216, in application
    25693 return application_unproxied(environ, start_response)
    25694 File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 202, in application_unproxied
    25695 result = handler(environ, start_response)
    25696 File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1215, in _ call_
    25697 return self.dispatch(environ, start_response)
    25698 File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1189, in _ call_
    25699 return self.app(environ, start_wrapped)
    25700 File "/usr/share/pyshared/werkzeug/wsgi.py", line 579, in call
    25701 return self.app(environ, start_response)
    25702 File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1347, in d ispatch
    25703 ir_http = request.registry['ir.http']
    25704 File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 319, in re gistry
    25705 return openerp.modules.registry.RegistryManager.get(self.db) if self.d b else None
    25706 File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", lin e 310, in get
    25707 update_module)
    25708 File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", lin e 341, in new
    25709 openerp.modules.load_modules(registry.db, force_demo, status, update module)
    25710 File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 354, in load_modules
    25711 force, status, report, loaded_modules, update_module)
    25712 File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 263, in load_marked_modules
    25713 loaded, processed = load_module_graph(cr, graph, progressdict, report= report, skip_modules=loaded_modules, perform_checks=perform_checks)
    25714 File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 182, in load_module_graph
    25715 _load_data(cr, module_name, idref, mode, kind='data')
    25716 File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 118, in _load_data
    25717 tools.convert_file(cr, module_name, filename, idref, mode, noupdate, k ind, report)
    25718 File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 8 97, in convert_file
    25719 convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
    25720 File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 9 83, in convert_xml_import
    25721 obj.parse(doc.getroot(), mode=mode)
    25722 File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 8 49, in parse
    25723 self._tags[rec.tag](self.cr, rec, n, mode=mode)
    25724 File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 7 63, in _tag_record
    25725 id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self. module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=sel f.isnoupdate(data_node), mode=self.mode, context=rec_context )
    25726 File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wra pper
    25727 return old_api(self, *args, **kwargs)
    25728 File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.p y", line 1037, in _update
    25729 model_obj.write(cr, uid, [res_id], values, context=context)
    25730 File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wra pper
    25731 return old_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view .py", line 282, in write
    25733 context)
    25734 File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wra pper
    25735 return old_api(self, *args, **kwargs)
    25736 File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 360, in old _api
    25737 result = method(recs, *args, **kwargs)
    25738 File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3665, in write
    25739 self._write(old_vals)
    25740 File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 235, in wra pper
    25741 return new_api(self, *args, **kwargs)
    25742 File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 552, in new _api
    25743 result = method(self._model, cr, uid, self.ids, *args, **kwargs)
    25744 File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3836, in _write
    25745 recs._validate_fields(vals)
    25746 File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 235, in wra pper
    25747 return new_api(self, *args, **kwargs)
    25748 File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1271, in _validate_fields
    25749 raise ValidationError('\n'.join(errors))
    25750 ParseError: "ValidateError
    25751 Field(s) arch failed against a constraint: Invalid view definition
    25752
    25753 Error details:
    25754 Field x_graduated_from does not exist
    25755
    25756 Error context:
    25757 View hr.employee.leave.form.inherit
    25758 [view_id: 844, xml_id: hr_holidays.view_employee_form_leave_inherit, model : hr.employee, parent_id: 812]" while parsing /usr/lib/python2.7/dist-pack ages/openerp/addons/hr_holidays/hr_holidays_view.xml:485, near
    25759
    25760 hr.employee.leave.form.inherit
    25761 hr.employee

    谢谢!


  • 管理员

    @tobe1求助大神,自定义字段不存在的错误要怎么删除。谢谢! 中说:

    x_graduated_from

    你这个字段创建了吗,如果没有创建,请在视图里面删掉对他的引用



  • @joshua 有创建这个字段的,在 employees 信息里面添加的自定义字段。现在打开就报这个错误。


  • 管理员

    @tobe1 看报错里面说是hr.employee.leave里面没有这个字段x_graduated_from,你检查下字段和模型有没有对应对?



  • @joshua 好的 谢谢 我去找找


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待