Skip to Content
Menu
This question has been flagged
2 Replies
2059 Views

Hello,

I can't open Odoo Studio because of this error message:

​ValueError: Element '' cannot be located in parent view

When I created an inheritance view for the product form. I set the "View Inheritance Mode" into Base View. So I deleted the inheritance view and the fields I used and created a new one with an Extension View and new fields. Is there any solution for it?

I keep locating the x_studio_lenght_1 field and found out that the field is on Base Field, not Custom Field, and it's under Product Variant, supposedly it's under Product. Also, Odoo Studio won't open only in the Product Form. Below is the XML code:


       
           

               
               
               
           



Avatar
Discard
Author

Sorry, I don't know why the error and code didn't display in my post. So, here is the error and the code:

ValueError: Element '<xpath expr="//form[@name=&#39;Product Template&#39;]/sheet[@name=&#39;product_form&#39;]/notebook[1]/page[@name=&#39;inventory&#39;]/group[@name=&#39;inventory&#39;]/group[@name=&#39;group_lots_and_weight&#39;]/div[@name=&#39;x_studio_length_1&#39;]">' cannot be located in parent view

XML Code:
<xpath expr="//div[@name='weight']" position="after">
<label for="x_studio_length_1" invisible="product_variant_count &gt; 1 and not is_product_variant"/>
<div class="o_row" name="x_studio_length_1" invisible="product_variant_count &gt; 1 and not is_product_variant">
<field name="x_studio_length_1" string="Shipping Dimensions" class="oe_inline"/>
<field name="x_studio_width_1" class="oe_inline"/>
<field name="x_studio_height" class="oe_inline"/>
</div>
</xpath>

Best Answer

Hi,
Most probably the issue with inherited view created from the studio, you can do as follows:

* Enable debug mode
* Navigate to view menu from settings -> technical -> user interface -> view
* open the studio generated view for your model, product.product or product.template
* make the view inactive for now
* come back to original form and see if the studio can be enabled now
* if yes , you can confirm that the issue is with the view which we have deactivated
* Now come back to the inactive view and find the problematic node and fix it



Thanks

Avatar
Discard
Author Best Answer

Thank you for your insights, Niyas. I found the views of who's creating the error. The  Odoo Studio: product.template.product.form customization views. Then I inactive it and I can enable the studio now. Thank you!

Avatar
Discard
Related Posts Replies Views Activity
0
Sep 21
1967
2
Feb 24
1639
1
May 25
2004
2
Feb 23
7324
3
Feb 23
6530