继承模块
class InheritProduct(models.Model):
_inherit = 'product.template'
fzyq = fields.Char(string='产品判断', default='fzyq')
method_standard = fields.Text(string="方法标准")
添加新的字段以及添加新的筛选字段
<odoo>
<data>
<record id="od_product_template_form_view" model="ir.ui.view">
<field name="name">odproduct.template.form.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='general_information']//field[@name='attrition_rate']" position="after">
<field name="fzyq" invisible="1"/>
</xpath>
<xpath expr="//page[@name='general_information']/group[1]" position="after">
<group string="方法标准">
<field name="method_standard" nolabel="1"/>
</group>
</xpath>
</field>
</record>
<record id="view_od_product_template_form_search" model="ir.ui.view">
<field name="name">product.template.search.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="method_standard"/>
</field>
</field>
</record>
</data>
</odoo>