gpt4 book ai didi

openerp - 验证字段 arch : Invalid XML for View Architecture 时出错

转载 作者:行者123 更新时间:2023-12-04 20:03:17 25 4
gpt4 key购买 nike

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

初始化.py

import ig_nomfurn

openerp.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>

最佳答案

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

关于openerp - 验证字段 arch : Invalid XML for View Architecture 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19025306/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com