Skip to Content
This question has been flagged
1502 Views

I'm attempting to install the WMS Accounting (stock_account) module on my Odoo 12 database. This results in the error below. As far as I could find, the only module defining a update_cost_price div is the stock_account module itself. Not sure what to make of this.


Odoo Server Error
Traceback (most recent call last):
  File "C:\Odoo12/odoo\odoo\models.py", line 1108, in _validate_fields
    check(self)
  File "c:\odoo12\odoo\odoo\addons\base\models\ir_ui_view.py", line 345, in _check_xml
    view_def = view.read_combined(['arch'])
  File "c:\odoo12\odoo\odoo\addons\base\models\ir_ui_view.py", line 794, in read_combined
    arch = self.apply_view_inheritance(arch_tree, root.id, self.model)
  File "c:\odoo12\odoo\odoo\addons\base\models\ir_ui_view.py", line 742, in apply_view_inheritance
    source = self.apply_inheritance_specs(source, specs_tree, view_id)
  File "c:\odoo12\enterprise\web_studio\models\ir_ui_view.py", line 152, in apply_inheritance_specs
    return super(View, self).apply_inheritance_specs(source, specs_tree, inherit_id)
  File "c:\odoo12\odoo\odoo\addons\base\models\ir_ui_view.py", line 720, in apply_inheritance_specs
    self.raise_view_error(_("Element '%s' cannot be located in parent view") % tag, inherit_id)
  File "c:\odoo12\odoo\odoo\addons\base\models\ir_ui_view.py", line 548, in raise_view_error
    raise ValueError(message)
ValueError: Element '<xpath expr="//div[@name='update_cost_price']/button">' cannot be located in parent view

Error context:
View `product.product.form.inherit.stock_account`
[view_id: 5061, xml_id: n/a, model: product.product, parent_id: 220]

Error context:
View `product.product.form.inherit.stock_account`
[view_id: 5061, xml_id: n/a, model: product.product, parent_id: 220]
None" while parsing file:/c:/users/stevensegers/projects/odoo/odoo12/odoo/addons/stock_account/views/product_views.xml:65, near
<record id="product_normal_form_view_inherit" model="ir.ui.view">
            <field name="name">product.product.form.inherit.stock_account</field>
            <field name="model">product.product</field>
            <field name="inherit_id" ref="product.product_normal_form_view"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//div[@name='update_cost_price']/button" position="attributes">
                        <attribute name="attrs">{'invisible':['|', ('valuation','!=', 'real_time'), ('cost_method', 'not in', ['average', 'standard'])]}</attribute>
                    </xpath>
                </data>
            </field>
        </record>
Avatar
Discard