Openerp Can';t在开放式erp中显示选择字段
这是字段信息,但未显示在网页中Openerp Can';t在开放式erp中显示选择字段,openerp,Openerp,这是字段信息,但未显示在网页中 'type': fields.selection([('country','Country'),('state','State')],'Type'), 在我看来,这一领域是 <field name="type"/> 我看不出你的代码有什么问题。可能是其他原因导致了你的问题。但是,您可以尝试稍微更改代码: 将所选内容声明为类外的全局变量: choice = (('country','Country'),('state','State')) 然后在
'type': fields.selection([('country','Country'),('state','State')],'Type'),
在我看来,这一领域是
<field name="type"/>
我看不出你的代码有什么问题。可能是其他原因导致了你的问题。但是,您可以尝试稍微更改代码: 将所选内容声明为类外的全局变量:
choice = (('country','Country'),('state','State'))
然后在你们班上:
'type_': fields.selection(choice,string='Type'),
您的xml还可以,但您可以尝试添加widget=“selection”:
请注意,我将您的字段重命名为类型,类型可能是保留的
<field name="type_" widget="selection"/>