تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2061 أدوات العرض

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:


       
           

               
               
               
           



الصورة الرمزية
إهمال
الكاتب

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>

أفضل إجابة

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

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
سبتمبر 21
1967
2
فبراير 24
1639
1
مايو 25
2004
2
فبراير 23
7325
3
فبراير 23
6531