Traceback(最近调用最后)Odoo V-8 自定义模块
Traceback (most recent call last) Odoo V-8 custom module
我是 Odoo 开发的新手,目前正在尝试学习基础知识,但遇到了一个问题。我正在研究 Odoo 版本 8。
我正在尝试安装饮食事实模块,但每次都出现相同的错误,我尝试切换浏览器但无济于事。
<?xml version="1.0" encoding= "utf-8"?>
<openerp>
<data>
<record id= "dietfacts_product_template_tree_view" model= "ir.ui.view">
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name= "model">product.template</field>
<field name="arch" type="xml">
<field name="categ_id" position="after">
<field name="calories"/>
<field name="servingsize"/>
<field name="lastupdated"/>
<field name="dietitem"/>
</field>
</field>
</record>
<record id= "dietfacts_product_template_form_view" model= "ir.ui.view">
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name= "model">product.template</field>
<field name="arch" type="xml">
<field name="type" position="after">
<field name="calories"/>
<field name="servingsize"/>
<field name="dietitem"/>
<field name="lastupdated"/>
</field>
</field>
</record>
<record id="product.product_template_action_dietfacts" model="ir.actions.act_window">
<field name="name">Diet Items</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_type">form</field>
<field name="view_id" ref="product.product_template_tree_view"/>
<field name="context">{"search_default_filter_to_sell":1, "default_dietitem":True}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product
</p>
</field>
</record>
<menuitem action = "product.product_template_action_dietfacts"
id="menu_product_template_action_dietfacts"
parent="base.menu_sales" sequence= "15"/>
</data>
</openerp>
Odoo 服务器错误
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 546, in _handle_exception
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 583, in dispatch
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 319, in _call_function
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\service\model.py", line 118, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 316, in checked_call
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 812, in __call__
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 412, in response_wrap
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\openerp\addons\web\controllers\main.py", line 884, in search_read
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\openerp\addons\web\controllers\main.py", line 905, in do_search_read
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 917, in proxy
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 5184, in search_read
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 1650, in search
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 4687, in _search
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 4498, in _where_calc
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\osv\expression.py", line 662, in __init__
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\osv\expression.py", line 830, in parse
ValueError: Invalid field u'categ.id.name' in leaf "<osv.ExtendedLeaf: (u'categ.id.name', u'=', u'Diet Items') on product_template (ctx: )>"
即使我清除了 cookie、缓存和更换浏览器,上述错误仍然存在。我什至尝试再次卸载并安装该模块。
有什么我想念的吗?请帮忙。先感谢您。
它不在您发布的代码中,但您在 product.template
上的任何地方都有一个过滤器域,这是错误的,可能只是一个错字。
应该是[('categ_id.name', '=', 'Diet Items')]
。 categ_id
是 product.template
的字段之一,它有一个下划线而不是点。
我是 Odoo 开发的新手,目前正在尝试学习基础知识,但遇到了一个问题。我正在研究 Odoo 版本 8。
我正在尝试安装饮食事实模块,但每次都出现相同的错误,我尝试切换浏览器但无济于事。
<?xml version="1.0" encoding= "utf-8"?>
<openerp>
<data>
<record id= "dietfacts_product_template_tree_view" model= "ir.ui.view">
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name= "model">product.template</field>
<field name="arch" type="xml">
<field name="categ_id" position="after">
<field name="calories"/>
<field name="servingsize"/>
<field name="lastupdated"/>
<field name="dietitem"/>
</field>
</field>
</record>
<record id= "dietfacts_product_template_form_view" model= "ir.ui.view">
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name= "model">product.template</field>
<field name="arch" type="xml">
<field name="type" position="after">
<field name="calories"/>
<field name="servingsize"/>
<field name="dietitem"/>
<field name="lastupdated"/>
</field>
</field>
</record>
<record id="product.product_template_action_dietfacts" model="ir.actions.act_window">
<field name="name">Diet Items</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_type">form</field>
<field name="view_id" ref="product.product_template_tree_view"/>
<field name="context">{"search_default_filter_to_sell":1, "default_dietitem":True}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product
</p>
</field>
</record>
<menuitem action = "product.product_template_action_dietfacts"
id="menu_product_template_action_dietfacts"
parent="base.menu_sales" sequence= "15"/>
</data>
</openerp>
Odoo 服务器错误
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 546, in _handle_exception
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 583, in dispatch
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 319, in _call_function
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\service\model.py", line 118, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 316, in checked_call
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 812, in __call__
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 412, in response_wrap
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\openerp\addons\web\controllers\main.py", line 884, in search_read
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\openerp\addons\web\controllers\main.py", line 905, in do_search_read
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\http.py", line 917, in proxy
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 5184, in search_read
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 1650, in search
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 4687, in _search
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\api.py", line 268, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\models.py", line 4498, in _where_calc
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\osv\expression.py", line 662, in __init__
File "C:\Program Files (x86)\Odoo 8.0-20170901\server\.\openerp\osv\expression.py", line 830, in parse
ValueError: Invalid field u'categ.id.name' in leaf "<osv.ExtendedLeaf: (u'categ.id.name', u'=', u'Diet Items') on product_template (ctx: )>"
即使我清除了 cookie、缓存和更换浏览器,上述错误仍然存在。我什至尝试再次卸载并安装该模块。 有什么我想念的吗?请帮忙。先感谢您。
它不在您发布的代码中,但您在 product.template
上的任何地方都有一个过滤器域,这是错误的,可能只是一个错字。
应该是[('categ_id.name', '=', 'Diet Items')]
。 categ_id
是 product.template
的字段之一,它有一个下划线而不是点。