跳至内容
菜单
此问题已终结
3 回复
15692 查看

I need to inherit product.pricelist form view. In this inherited form view I need to add buttons and state in header. But there is no header tag in product.pricelist form view.  

So I used below the code in the inherited form view, but the state showed in the sheet not in the header.

<xpath expr="//field[@name='active']" position="before">

              <header>

              <field name="state" widget="statusbar"/>

              </header>

<xpath>

So how to add header in inherited form view in odoo 10?

形象
丢弃
最佳答案

Hi,

You can add header to a view  by inheriting like this,

<xpath expr="/form/*" position="before">
<header>
<field name="state" widget="statusbar"/>
</header>
</xpath>
形象
丢弃
编写者

Hi Niyas,

Your answer is perfect. Its work correctly. Thanks.

最佳答案

But it doesn't work in project.project class

形象
丢弃