3

我尝试在 OpenERP 7 中创建一个模块,但出现此错误“验证字段拱门时发生错误:视图架构的 XML 无效!”我花了很多时间但我可以解决它。我的代码是:

初始化.py

import ig_nomfurn

开放程序.py

  {
    'name': 'ig_nomfurn',
    'version': '1.0',
    'category': 'Generic Modules/Others',
    'description': """
    Partea de infogest transcrisa in OpenERP
    ========================================

    Porteaza o partea din functiunile infogest in OpenERP
    """,
    'author': 'bogdan @ nvncompany.ro',
    'depends': ['base'],
    'data': [
        'ig_nomfurn_view.xml',
    ],
    'installable': True,
    'auto_install': False,
    }

ig_nomfurn.py

from openerp.osv import fields, osv

class ig_nomfurn(osv.osv):
_name = 'ig.nomfurn'
_description = "nomfurn"
_columns = {
    'name': fields.char('Name', size=8),
}

ig_nomfurn_view.xml

<?xml version="1.0" encoding="utf-8"?>

<openerp>
<data>
    <menuitem id="ig_openerp_main" 
        name="Ig OpenERP"/>

    <menuitem id="ig_openerp"
        name="IG OpenERP"
        parent="ig_openerp_main"/>        

    <record id="view_ig_nomfurn" model="ir.ui.view">
        <field name="name">ig.nomfurn.form</field>
        <field name="model">ig.nomfurn</field>
        <field name="arch" type="xml">
            <form string="Create New Dashboard" version="7.0">
                <group colspan="4">
                    <field name="name"/>
                </group>
           </form>
        </field>
    </record>

    <record id="action_ig_nomfurn" model="ir.actions.act_window">
        <field name="name">View Boars</field>
        <field name="res_model">ig.nomfurn</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
       <field name="view_id" ref="view_ig_nomfurn"/>
       <field name="target">new</field>
    </record>

    <menuitem action="action_ig_nomfurn"
        id="ig_nomfurn" 
        name="Nomfurn"
        parent="ig_openerp"
        />
</data>
</openerp>
4

1 回答 1

1

找不到任何问题。请尝试在课程末尾添加 ig_nomfurn()。

于 2013-09-27T08:55:29.720 回答