我是OpenERP的新手。我在ubuntu12.04和eclipse juno上開發了一個在OpenERP v7上安裝的新模塊,但是我得到了下面的錯誤。ValidateError驗證字段拱時發生錯誤:View Architecture的無效XML !?
"ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture!"
任何一個可以幫我...
下面是我的所有文件。
_ 初始化 _.py
import mymodule
__openerp__.py
{
'name': 'mymodule',
'version': '1.0',
'category': 'My own Module',
'description': """
This is customised mymodule
""",
'author': 'SANTOSH',
'maintainer': 'SANTOSH',
'images' : ['images/icon.jpg'],
'depends': ['base','web'],
'init_xml' : ['mymodule_menu.xml'],
'data': [
'mymodule_menu.xml',
],
'demo': [
'mymodule_menu.xml',
],
'test': [
'mymodule_menu.xml',
],
'installable': True,
'auto_install': False,
}
mymodule.py
from openerp.osv import fields, osv
class mymodule_test(osv.osv):
_name = "mymodule.test"
_column = {'name':fields.char('Name',size=256, Required = True),
'company':fields.char('Company', size = 256, Required = True),
}
mymodule_test()
mymodule_menu.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="mymodule.test_view_form">
<field name="name">Mymodule</field>
<field name="model">mymodule.test</field>
<field name="arch" type="xml">
<form string="Mymodule" version="7.0">
<field name="name"/>
<field name="company"/>
</form>
</field>
</record>
<record id="action_mymodule" model="ir.actions.act_window">
<field name="name">mymodule</field>
<field name="res_model">mymodule.test</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
</record>
<menuitem id="section_main_menu" name="Mymodule" />
<menuitem id="menuitem_id" name="MymoduleList" parent="section_main_menu" action="action_mymodule" />
</data>
</openerp>
你也可以發佈錯誤描述嗎? – Vivek