初尝开发,这个报错弄得没脾气,求助各位~(已解决)
-
上午下班前这个模块可以安装成功的,关机午饭回来后,再试就一直报这个错误,我都没改过任何代码。郁闷,有遇到过的吗???
ParseError: "ValidateError<br />Field(s) `res_model, src_model` failed against a constraint: Invalid model name in the action definition." while parsing /odoo8/my_addons/todo_task/views.xml:4, near<br /><record id="aciton_todotask_task" model="ir.actions.act_window"><br /> <field name="name">todo task</field><br /> <field name="type">ir.actions.act_window</field><br /> <field name="res_model">todotask.task</field><br /> <field name="view_mode">tree,form</field><br /> </record>
<?xml version="1.0" encoding="utf-8"?><br /><openerp><br /> <data><br /> <record id="aciton_todotask_task" model="ir.actions.act_window"><br /> <field name="name">todo task</field><br /> <field name="type">ir.actions.act_window</field><br /> <field name="res_model">todotask.task</field><br /> <field name="view_mode">tree,form</field><br /> </record><br /><br /> <record id="todo_task_form" model="ir.ui.view"><br /> <field name="name">todo task form</field><br /> <field name="model">todotask.task</field><br /> <field name="arch" type="xml"><br /> <form string=""><br /> <header><br /> <button name="do_toggle_done" string="设为完成" class="oe_highlight" states="" type="object"/><br /> <button name="do_clear_done" string="清除所有完成" class="oe_highlight" states="" type="object"/><br /> </header><br /> <sheet><br /> <group name="group top"><br /> <group name="group left"><br /> <field name="name"/><br /> </group><br /> <group name="group right"><br /> <field name="is_done"/><br /> <field name="active" readonly="1"/><br /> </group><br /> </group><br /> </sheet><br /> </form><br /> </field><br /> </record><br /><br /> <record id="todo_task_tree" model="ir.ui.view"><br /> <field name="name">todo task tree</field><br /> <field name="model">todotask.task</field><br /> <field name="arch" type="xml"><br /> <tree string="" colors="gray:is_done==True"><br /> <field name="name"/><br /> <field name="is_done"/><br /> </tree><br /> </field><br /> </record><br /><br /> <record id="todo_task_filter" model="ir.ui.view"><br /> <field name="name">todo task filter</field><br /> <field name="model">todotask.task</field><br /> <field name="arch" type="xml"><br /> <search><br /> <filter name="name"/><br /> <filter string="未完成" domain="[('is_done', '=', False)]"/><br /> <filter string="已完成" domain="[('is_done', '!=', False)]"/><br /> </search><br /> </field><br /> </record><br /><br /><br /> <!-- This Menu Item must have a parent and an action --><br /> <menuitem id="menu_todo_task" name="工作计划" parent="mail.mail_feeds" action="aciton_todotask_task" sequence="20"/><br /> </data><br /></openerp>
-
问题解决了,是我的model写错了,没有生成对象,错误提示却一直提示xml错误