新手求助:二次开发遇到的问题
-
在学习OpenERP二次开发的过程中遇到了一个问题
py文件相关代码:
class classroom(osv.osv):
_name = 'course.classroom'
_description = 'Classrooms'
columns = {
'building' : fields.char('Building', size=64, required=True),
'room_num' : fields.char('Room Number', size=64, required=True),
'seats' : fields.integer(string='Seats', required=True), }
view文件文件相关代码:
<record model="ir.ui.view" id="course_classroom_form">
<field name="name">Classroom</field>
<field name="model">course.classroom</field>
<field name="arch" type="xml">
<form string="Classroom" >
<field name="building" />
<field name="room_num" />
<field name="seats" />
</form>
</field>
</record>
在安装的时候报错如下:
ParseError: "ValidateError
The field(s)arch, model
failed against a constraint: The model name does not exist or the view architecture cannot be rendered." while parsing file:///D:/Work%20Files/Project%20Files/workspace/openerp-8.0dev-20131208-000101/openerp/addons/course/course_view.xml:5, near
<record model="ir.ui.view" id="course_classroom_form">
<field name="name">Classroom</field>
<field name="model">course.classroom</field>
<field name="arch" type="xml">
<form string="Classroom">
<field name="building"/>
<field name="room_num"/>
<field name="seats"/>
</form>
</field>
</record>
折腾一天 弄不出来
求指教 -
columns= ... ---> _columns= ...
重启服务,重新安装