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

I am using existing code and trying to upgrade a module. But during the upgrade, I am getting the following error. Can someone please help me how to resolve the issue as I am new and don't know where to look for such an issue.

File "/home/Project/odoo/odoo/odoo/models.py", line 1112, in _validate_fields

    raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))

odoo.tools.convert.ParseError: "Error while validating constraint


Element '<xpath expr="//group[@name='extra_images']">' cannot be located in parent view


Error context:

View `label_product.template.form.view`

[view_id: 2035, xml_id: emipro_theme_base.label_product_template_form_inherit, model: product.template, parent_id: 543]

None" while parsing /home/Project/odoo/odoo/addons/emipro_theme_base/views/product_label_view.xml:5, near

<record id="label_product_template_form_inherit" model="ir.ui.view">

            <field name="name">label_product.template.form.view</field>

            <field name="model">product.template</field>

            <field name="inherit_id" ref="product.product_template_form_view"/>

            <field name="arch" type="xml"> 

            <xpath expr="//group[@name='extra_images']" position="before">

<group name="label" string="Sale Label">

<field name="label_ept_id" title="Label"/>

<field name="product_icon" title="Product Icon" widget="image"/>

</group>

</xpath>

        </field>

        </record>

Avatar
Hylkää

did you add the module name which you are inheriting on 'depends' in manifest file ?

Paras vastaus

Hello,

You may have another custom module that inherits the same view and delete/replace somehow the tag group (with name="extra_images").

You can check this by referring to the inherited view from the odoo interface (Activate developer mode and open the views list) and seeing all the inherited views.

Good Luck.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
kesäk. 15
1182
5
lokak. 20
7224
0
marrask. 24
5228
1
elok. 15
10000
1
maalisk. 15
3460