Python 字段未显示在product.template odoo8中
我做错了什么?我在这个图像标题中有一个图像,在这个标题之后我想显示内部参考字段。您可以在该图像右侧的内部参考字段中看到。请查看此图像示例 这是*xml文件Python 字段未显示在product.template odoo8中,python,css,xml,odoo,Python,Css,Xml,Odoo,我做错了什么?我在这个图像标题中有一个图像,在这个标题之后我想显示内部参考字段。您可以在该图像右侧的内部参考字段中看到。请查看此图像示例 这是*xml文件 <openerp> <data> <record id="product_template_form_view" model="ir.ui.view"> <field name="name">product.template.form.view&
<openerp>
<data>
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.form.view</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@class='oe_title']/h1" position="after">
<label class="oe_edit_only" for="default_code" string="Internal reference"/>
<field name="default_code" class="oe_inline"/>
</xpath>
</field>
</record>
</data>
</openerp>
from openerp.osv import fields, osv
class product_template(osv.osv):
_inherit = 'product.template'
_columns = {
'default_code': fields.char('Internal Reference', select=True),
}
试试下面的代码
product.template.form.view
产品模板
希望它能帮助你。哦,这是我的错。用双引号替换
。更新了我的答案。@PragyaChhabra,它的div不是dic,还从表达式中删除>。更新了我的答案。我尝试了很多方法,但标题后没有显示内部参考字段。只有空格。更新了我的答案。谢谢!你帮了你的忙,真是太好了。如果没有你的帮助,这不会这么快。