Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
2386 Zobrazení

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
Zrušit
Autor

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>

Nejlepší odpověď

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
zář 21
2091
2
úno 24
1823
1
kvě 25
2389
2
úno 23
7608
3
úno 23
6704