I'm customizing Invoice task window in odoo 9
My existing form
<record id="view_account_analytic_account_form" model="ir.ui.view">
<field name="name">analytic.analytic.account.form</field>
<field name="model">account.analytic.account</field>
<field name="arch" type="xml">
<form string="Analytic Account">
<sheet string="Analytic Account">
<field name="name" class="oe_inline" placeholder="e.g. Project XYZ"/>
<group>
<field name="account_type" invisible="1"/>
<field name="partner_id"/>
</group>
<group>
<field name="code"/>
<field name="tag_ids" widget="many2many_tags"/>
<field name="company_id"/>
<field name="currency_id"/>
</group>
</sheet>
</form>
</field>
</record>
Instead of above form I want to replace as below
<form string="Analytic Entry">
<sheet>
<group>
<group>
<field name="name" />
</group>
<group>
<field name="date" />
<field name="ref" />
<field name="company_id" groups="base.group_multi_company" />
</group>
<group string="Product Information">
<field name="product_id" domain="[('name_template','=','Service')]" />
<label for="unit_amount" />
<div>
<field name="unit_amount" class="oe_inline" />
<field name="product_uom_id" class="oe_inline" />
</div>
</group>
</group>
</sheet>
</form>
I tried with
<xpath expr="//form[@string='Analytic Account']" position="replace" >
<form>
<!-- my form view -->
</form> </xpath>
I don't want to replace my fileds I just want to replace my full form view by using id
can anyone please help me ?
Yes it will overwrite the existing form view