Odoo中文社区可以通过以下三个域名访问:shine-it.net , odoocn.org,odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

新手求助:二次开发遇到的问题



  • 在学习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>
    折腾一天  弄不出来
    求指教



  • 在学习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= ...

    重启服务,重新安装



  • 校长果然火眼金睛


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待