在我的模块中,我尝试按天调整日期字段,但在尝试升级模块时,会出现无效的XML for view错误:
这是生成错误(:year)的XML的一部分:
<record model="ir.ui.view" id="id_view_contact">
<field name="name">test.base.graph.view1</field>
<field name="model">test.base</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="contacts" type="bar" >
<field name="create_date:year" type="row" group="False" />
<field name="name" type="col"/>
</graph>
</field>
</record>
这是显示datetime属性的OpenERP V7文档:OpenERP V7 Documentation
提前致谢。
这是确切的错误:
OpenERP Server Error
Client Traceback (most recent call last):
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\web\http.py", line 204, in dispatch
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\web\controllers\main.py", line 1137, in call_button
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\web\controllers\main.py", line 1125, in _call_kw
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\web\session.py", line 42, in proxy
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\web\session.py", line 30, in proxy_method
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\web\session.py", line 103, in send
Server Traceback (most recent call last):
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\web\session.py", line 89, in send
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\netsvc.py", line 300, in dispatch_rpc
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\service\web_services.py", line 628, in dispatch
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\service\security.py", line 40, in check
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\pooler.py", line 49, in get_pool
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\pooler.py", line 33, in get_db_and_pool
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\modules\registry.py", line 203, in get
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\modules\registry.py", line 233, in new
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\modules\loading.py", line 351, in load_modules
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\modules\loading.py", line 256, in load_marked_modules
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\modules\loading.py", line 187, in load_module_graph
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\modules\loading.py", line 74, in <lambda>
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\modules\loading.py", line 124, in _load_data
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\tools\convert.py", line 959, in convert_xml_import
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\tools\convert.py", line 852, in parse
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\tools\convert.py", line 819, in _tag_record
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\base\ir\ir_model.py", line 956, in _update
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\openerp\addons\base\ir\ir_ui_view.py", line 214, in write
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\osv\orm.py", line 4325, in write
File "C:\Program Files (x86)\OpenERP 7.0-20150506\server\.\openerp\osv\orm.py", line 1577, in _validate
except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')
答案 0 :(得分:1)
:
<field name="create_date:year" type="row" group="False" />
“年份”在OpenERP v7中不存在,它是在OpendoP的新版本Odoo 8中添加的新功能。