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

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

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

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

初尝开发,这个报错弄得没脾气,求助各位~(已解决)



  • 上午下班前这个模块可以安装成功的,关机午饭回来后,再试就一直报这个错误,我都没改过任何代码。郁闷,有遇到过的吗???

    ParseError: &quot;ValidateError<br />Field(s) `res_model, src_model` failed against a constraint: Invalid model name in the action definition.&quot; while parsing /odoo8/my_addons/todo_task/views.xml:4, near<br />&lt;record id=&quot;aciton_todotask_task&quot; model=&quot;ir.actions.act_window&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;todo task&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;type&quot;&gt;ir.actions.act_window&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;res_model&quot;&gt;todotask.task&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;view_mode&quot;&gt;tree,form&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;
    



    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;openerp&gt;<br />&nbsp; &nbsp; &lt;data&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;aciton_todotask_task&quot; model=&quot;ir.actions.act_window&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;todo task&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;type&quot;&gt;ir.actions.act_window&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;res_model&quot;&gt;todotask.task&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;view_mode&quot;&gt;tree,form&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;todo_task_form&quot; model=&quot;ir.ui.view&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;todo task form&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model&quot;&gt;todotask.task&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;form string=&quot;&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;header&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;button name=&quot;do_toggle_done&quot; string=&quot;设为完成&quot; class=&quot;oe_highlight&quot; states=&quot;&quot; type=&quot;object&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;button name=&quot;do_clear_done&quot; string=&quot;清除所有完成&quot; class=&quot;oe_highlight&quot; states=&quot;&quot; type=&quot;object&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/header&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;sheet&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=&quot;group top&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=&quot;group left&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=&quot;group right&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;is_done&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;active&quot; readonly=&quot;1&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/sheet&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/form&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;todo_task_tree&quot; model=&quot;ir.ui.view&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;todo task tree&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model&quot;&gt;todotask.task&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tree string=&quot;&quot; colors=&quot;gray:is_done==True&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;is_done&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tree&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;record id=&quot;todo_task_filter&quot; model=&quot;ir.ui.view&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;todo task filter&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model&quot;&gt;todotask.task&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;search&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;filter name=&quot;name&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;filter string=&quot;未完成&quot; domain=&quot;[(&#039;is_done&#039;, &#039;=&#039;, False)]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;filter string=&quot;已完成&quot; domain=&quot;[(&#039;is_done&#039;, &#039;!=&#039;, False)]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/search&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- This Menu Item must have a parent and an action --&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;menuitem id=&quot;menu_todo_task&quot; name=&quot;工作计划&quot; parent=&quot;mail.mail_feeds&quot; action=&quot;aciton_todotask_task&quot; sequence=&quot;20&quot;/&gt;<br />&nbsp; &nbsp; &lt;/data&gt;<br />&lt;/openerp&gt;
    


  • 问题解决了,是我的model写错了,没有生成对象,错误提示却一直提示xml错误