Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

I can't delete a page in form view

By
amina
on 12/11/15, 5:18 AM 498 views

want to delete the Inventory page of product.product_template_form_view but it gives me this error

error
AttributeError: element '<div name="weight">' cannot be located in view parent

Contexte de l'erreur :
Vue `product.template.stock.property.form.inherit`
[view_id: 833, xml_id: stock.view_template_property_form, model: product.template, parent_id: 303]

here is my code using the xpath expression

<record id="view_product_form_inherit" model="ir.ui.view">

<field name="name">product.template.common.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>

<xpath expr="//page[2]" position="replace">

</xpath>

  </field>

</record>

2
Swapnesh
On 12/11/15, 6:28 AM

Hello,


Try using this

<record id="view_product_form_inherit" model="ir.ui.view">

<field name="name">product.template.common.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>

<xpath expr="//page[2]" position="attributes">

             <attribute name="invisible">1</attribute>

         </xpath>

  </field>

</record>

0
amina
On 12/11/15, 7:19 AM

thanks it worked :) without need to modify any other module  just hiding the page great 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/11/15, 5:18 AM
Seen: 498 times
Last updated: 12/15/15, 8:12 AM