AssertionError: Element odoo has extra content: record, line 3
请问大家有没有碰到过这个错误,找了好久都没有解决,xml文件没有错误之前创建的模块都可以安装现在新建了一个模块安装时一直报这个错误
下面是我的代码
manger.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_machine_form" model="ir.ui.view">
<field name="name">machine.form</field>
<field name="model">sd.attendance.equipment</field>
<field name="arch" type="xml">
<form string="Biometric Device">
<header>
<button name="attendance_data" type="object" string="获取考勤机数据" class="oe_highlight"
icon="fa-download " confirm="Are you sure you want to do this?"/>
</header>
<sheet>
<div class="oe_title">
<label for="ip"/>
<h1>
<field name="ip" placeholder="Machine IP"/>
</h1>
</div>
<group>
<group>
<field name="port_no"/>
<field name="name"/>
</group>
<group>
<field name="totalStorage"/>
<field name="usedStorage"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_attendance_machine_tree" model="ir.ui.view">
<field name="name">考勤机列表</field>
<field name="model">sd.attendance.equipment</field>
<field name="arch" type="xml">
<tree>
<field name="ip"/>
<field name="port_no"/>
<field name="name"/>
<field name="company_id"/>
</tree>
</field>
</record>
<record id="machine_action" model="ir.actions.act_window">
<field name="name">考勤机</field>
<field name="res_model">sd.attendance.equipment</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_attendance_machine_tree"/>
</record>
</data>
</odoo>
views.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<menuitem id="machine_menu" parent="hr_attendance.menu_hr_attendance_root" sequence="50" name="考勤机数据管理" />
<menuitem id="machine_sub_menu"
parent="machine_menu"
name="考勤机机管理"
action="machine_action"
sequence="1"/>
</data>
</odoo>
网上有说把data去掉但是没有用