在视图定义中增加
<field name="inherit_id" ref="sale.view_order_form"/>
来制定继承自哪个视图
可以使用xpath或者<field name="partner_id" position="after">xxx</>来增加或修改页面信息
当然,按钮一样可以进行继承修改
<button name="xxx" position="replace"></button>这样按钮就被删除了
继承会用到的属性
position=“after”
position=“before”
position=“replace”
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="options">{'no_create': True,'no_open': True}</attribute>
<!--many2one字段去掉创建编辑部分-->
</xpath>
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="required">1</attribute>
</xpath>