Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4451 มุมมอง

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>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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>

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
how to delete a page in form view? แก้ไขแล้ว
7
ม.ค. 16
8277
1
ธ.ค. 24
6213
3
ส.ค. 24
7059
how to know the odoo master password? แก้ไขแล้ว
4
ก.ค. 24
41467
Default value in form view แก้ไขแล้ว
5
เม.ย. 23
99410