Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
2090 Näkymät

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
Hylkää
Tekijä

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>

Paras vastaus

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
Hylkää
Tekijä Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
syysk. 21
1977
2
helmik. 24
1658
1
toukok. 25
2052
2
helmik. 23
7346
3
helmik. 23
6533