Skip to Content
Menu
This question has been flagged
1443 Views

am using odoo 14 every time I try to install this custom app this is what I get, I have been trying to fix this issue for 2 weeks now and no luck.


Error:

Odoo Server Error


Traceback (most recent call last):

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ tools \ convert.py", line 677, in _tag_root

    f (rec)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ tools \ convert.py", line 580, in _tag_record

    record = model._load_records ([data], self.mode == 'update')

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ models.py", line 4211, in _load_records

    records = self._load_records_create ([data ['values'] for data in to_create])

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ models.py", line 4140, in _load_records_create

    return self.create (values)

  File "<decorator-gen-42>", line 2, in create

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ api.py", line 345, in _model_create_multi

    return create(self, arg)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_ui_view.py", line 482, in create

    return super(View, self).create(vals_list)

  File "<decorator-gen-64>", line 2, in create

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\api.py", line 345, in _model_create_multi

    return create(self, arg)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_fields.py", line 533, in create

    recs = super().create(vals_list)

  File "<decorator-gen-13>", line 2, in create

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\api.py", line 345, in _model_create_multi

    return create(self, arg)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\models.py", line 3901, in create

    fields[0].determine_inverse(batch_recs)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\fields.py", line 1185, in determine_inverse

    getattr(records, self.inverse)()

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_ui_view.py", line 300, in _inverse_arch

    view.write(data)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\website\models\theme_models.py", line 267, in write

    res = super(IrUiView, other_views).write(vals)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\website\models\ir_ui_view.py", line 68, in write

    return super(View, self).write(vals)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_ui_view.py", line 500, in write

    res = super(View, self).write(self._compute_defaults(vals))

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\models.py", line 3685, in write

    real_recs._validate_fields(vals, inverse_fields)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\models.py", line 1260, in _validate_fields

    check(self)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_ui_view.py", line 408, in _check_xml

    raise ValidationError(_(

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_ui_view.py", line 391, in _check_xml

    view.postprocess_and_fields(view_doc, validate=True)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_ui_view.py", line 851, in postprocess_and_fields

    arch, name_manager = self._postprocess_view(node, model, validate=validate)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_ui_view.py", line 863, in _postprocess_view

    self.postprocess(node, [], editable, name_manager)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 963, in postprocess

    self.postprocess (child, current_node_path, node_info ['editable'], name_manager)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 963, in postprocess

    self.postprocess (child, current_node_path, node_info ['editable'], name_manager)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 963, in postprocess

    self.postprocess (child, current_node_path, node_info ['editable'], name_manager)

  [Previous line repeated 1 more time]

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 942, in postprocess

    postprocessor (node, name_manager, node_info)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 999, in _postprocess_tag_field

    xarch, sub_name_manager = self.with_context (

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 865, in _postprocess_view

    name_manager.check_view_fields (self)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 2009, in check_view_fields

    view.handle_view_error (msg)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ addons \ base \ models \ ir_ui_view.py", line 673, in handle_view_error

    raise ValueError (formatted_message) .with_traceback (from_traceback) from from_exception

odoo.exceptions.ValidationError: Error while validating view:


Field parent used in context.flag_config_ok ({'flag_config_ok': not parent and context.get ('default_config_ok', False) or parent.config_ok}) must be present in view but is missing.


View name: product.configurator.product.template.form

Error context:

 view: ir.ui.view (1632,)

 xmlid: product_template_form_view

 view.model: product.template

 view.parent: ir.ui.view (442,)

 file: c:\users\samik\downloads\odoo14\extra addons\product_configurator\views\product_view.xml



The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_http.py", line 237, in _dispatch

    result = request.dispatch()

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\http.py", line 683, in dispatch

    result = self._call_function(**self.params)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\http.py", line 359, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\service\model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\http.py", line 347, in checked_call

    result = self.endpoint(*a, **kw)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\http.py", line 912, in __call__

    return self.method(*args, **kw)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\http.py", line 531, in response_wrap

    response = f(*args, **kw)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\web\controllers\main.py", line 1381, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\web\controllers\main.py", line 1369, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\api.py", line 396, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\api.py", line 383, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-71>", line 2, in button_immediate_install

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_module.py", line 73, in check_and_log

    return method(self, *args, **kwargs)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_module.py", line 474, in button_immediate_install

    return self._button_immediate_function(type(self).button_install)

  File "C:\Program Files\Odoo 14.0.20210319\server\odoo\addons\base\models\ir_module.py", line 592, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ modules \ registry.py", line 89, in new

    odoo.modules.load_modules (registry._db, force_demo, status, update_module)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ modules \ loading.py", line 453, in load_modules

    processed_modules + = load_marked_modules (cr, graph,

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ modules \ loading.py", line 346, in load_marked_modules

    loaded, processed = load_module_graph (

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ modules \ loading.py", line 221, in load_module_graph

    load_data (cr, idref, mode, kind = 'data', package = package)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ modules \ loading.py", line 69, in load_data

    tools.convert_file (cr, package.name, filename, idref, mode, noupdate, kind)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ tools \ convert.py", line 733, in convert_file

    convert_xml_import (cr, module, fp, idref, mode, noupdate)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ tools \ convert.py", line 799, in convert_xml_import

    obj.parse (doc.getroot ())

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ tools \ convert.py", line 719, in parse

    self._tag_root (de)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ tools \ convert.py", line 677, in _tag_root

    f (rec)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ tools \ convert.py", line 681, in _tag_root

    raise ParseError ('while parsing% s:% s, near \ n% s'% (

Exception


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ http.py", line 639, in _handle_exception

    return super (JsonRequest, self) ._ handle_exception (exception)

  File "C: \ Program Files \ Odoo 14.0.20210319 \ server \ odoo \ http.py", line 315, in _handle_exception

    raise exception.with_traceback (None) from new_cause

odoo.tools.convert.ParseError: while parsing file: / c: /users/samik/downloads/odoo14/extra addons/product_configurator/views/product_view.xml: 33, near

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

        <field name = "name"> product.configurator.product.template.form </field>

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

        <field name = "priority"> 16 </field>

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

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

            <data> <xpath expr = "// header" position = "inside">

                <button class = "oe_stat_button" name = "get_product_attribute_values_action" attrs = "{'invisible': ['|', ('attribute_line_ids', '=', []), ('config_ok', '=', False)] } "groups =" product_configurator.group_product_configurator_manager "type =" object "string =" Variant Prices ">

                </button>

                <button name = "configure_product" class = "oe_highlight" type = "object" string = "Configure Product" groups = "product_configurator.group_product_configurator" attrs = "{'invisible': [('config_ok', '=', False) ]} "/>

            </xpath>

            <xpath expr = "// label [@ for = 'purchase_ok' or @ for = 'sale_ok']" position = "after">

                <div class = "oe_left" name = "options" groups = "base.group_user">

                    <field name = "id" invisible = "True" />

                </div>

            </xpath>


            <! - Product attributes ->

            <xpath expr = "// field [@ name = 'attribute_line_ids']" position = "attributes">

                <attribute name = "context"> {

                    'show_attribute': False,

                    'attribute_line_ids': attribute_line_ids,

                } </attribute>

            </xpath>


            <! - TODO: Implement a method to hide this field for non-configurable product templates ->

            <xpath expr = "// field [@ name = 'attribute_line_ids'] / tree / field [@ name = 'value_ids']" position = "after">

                <field name = "default_val" domain = "[('id', 'in', value_ids)]" context = "{'show_attribute': False}" options = "{'no_create': True, 'no_create_edit': True } "invisible =" not context.get ('default_config_ok', False) "/>

                <field name = "required" invisible = "not context.get ('default_config_ok', False)" />

                <field name = "multi" invisible = "not context.get ('default_config_ok', False)" attrs = "{'readonly': [('custom', '=', True)]}" force_save = "1" />

                <field name = "custom" invisible = "not context.get ('default_config_ok', False)" attrs = "{'readonly': [('multi', '=', True)]}" force_save = "1" />

            </xpath>


            <xpath expr = "// field [@ name = 'attribute_line_ids'] / tree / field [@ name = 'value_ids']" position = "attributes">

                <attribute name = "attrs"> {'required': [('custom', '! =', True)]} </attribute>

            </xpath>


            <xpath expr = "// field [@ name = 'attribute_line_ids'] / tree / field [@ name = 'attribute_id']" position = "attributes">

                <attribute name = "context"> {'flag_config_ok': not parent and context.get ('default_config_ok', False) or parent.config_ok} </attribute>

            </xpath>


            <xpath expr = "// field [@ name = 'attribute_line_ids'] / tree / field [@ name = 'attribute_id']" position = "before">

                <field name = "sequence" widget = "handle" />

            </xpath>


            <! - TODO: Apply domains so only values ​​from template are available ->

            <xpath expr = "// notebook / page [@ name = 'variants']" position = "after">

                <page string = "Configurator" name = "configurator" attrs = "{'invisible': [('config_ok', '=', False)]}" groups = "product_configurator.group_product_configurator">

                <separator colspan = "4" string = "Configuration Restrictions" name = "configurator_restrictions" />

                <field name = "config_line_ids" attrs = "{'readonly': [('attribute_line_ids', '=', [])]}" context = "{'show_attribute': False}">

                    <tree string = "Attribute Value Dependencies" editable = "bottom">

                        <field name="sequence" widget="handle"/>

                        <field name="attribute_line_id" domain="[('product_tmpl_id','=',parent.id)]" options="{'no_create': True, 'no_create_edit': True}"/>

                        <!-- # TODO: Find a more elegant way to restrict the value_ids -->

                        <field name="attr_line_val_ids" widget="many2many_tags" invisible="True"/>

                        <field name="value_ids" widget="many2many_tags" attrs="{'readonly': [('attribute_line_id','=',False)]}" domain="[('id','in',attr_line_val_ids)]" options="{'no_create': True, 'no_create_edit': True}" context="{'show_attribute': False}"/>

                        <field name="domain_id" context="{'product_tmpl_id': product_tmpl_id or active_id or parent.id, 'product_attribute_ids': template_attribute_ids}"/>

                        <field name="product_tmpl_id" invisible="1"/>

                        <field name="template_attribute_ids" invisible="1"/>


                    </tree>

                </field>

                <separator colspan = "4" string = "Configuration Steps" name = "configurator_steps" />

                <field name = "config_step_line_ids" attrs = "{'readonly': [('attribute_line_ids', '=', [])]}">

                    <tree string = "Configuration Steps" editable = "bottom">

                        <field name = "sequence" widget = "handle" />

                        <field name = "config_step_id" />

                        <field name = "attribute_line_ids" domain = "[('product_tmpl_id', '=', parent.id)]" options = "{'no_create': True, 'no_create_edit': True}" widget = "many2many_tags" />

                    </tree>

                </field>

                <separator colspan="4" string="Configuration Images" name="configurator_images"/>

                <field name="config_image_ids">

                    <tree editable="bottom" string="Configuration Images">

                        <field name="sequence" widget="handle"/>

                        <field name="name"/>

                        <field name="value_ids" widget="many2many_tags" context="{'_cfg_product_tmpl_id': parent.id}"/>

                        <field name="image_1920" widget="image" height="30px"/>

                    </tree>

                </field>

                <field name="attribute_line_val_ids" invisible="1"/>

                <field name="attribute_value_line_ids" invisible="1">

                    <tree string="Attribute value lines" editable="bottom" context="{'default_product_tmpl_id': self.id}">

                        <field name="product_tmpl_id" invisible="1"/>

                        <field name="attribute_id" invisible="1"/>

                        <field name="sequence" widget="handle"/>

                        <field name="value_id" domain="[('id', 'in', parent.attribute_line_val_ids)]"/>

                        <field name = "value_ids" domain = "[('id', 'in', parent.attribute_line_val_ids), ('attribute_id', '! =', attribute_id)]" widget = "many2many_tags" />

                    </tree>

                </field>

                <separator string = "Variant Name" colspan = "4" groups = "product_configurator.group_product_configurator_manager" />

                    <field name = "mako_tmpl_name" groups = "product_configurator.group_product_configurator_manager" />

                </page>

            </xpath>


            <xpath expr = "// field [@ name = 'default_code']" position = "attributes">

                <attribute name = "attrs"> {'invisible': [('config_ok', '=', True)]} </attribute>

            </xpath>


        </data> </field>

    </record>

Avatar
Discard