Skip to Content
Menu
This question has been flagged
2 Replies
4047 Views

this is the same error i m getting in installing any app/module on odoo 10 here is the error message log which appear while installing "Purchase Management":


Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 638, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 675, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 331, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 119, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 324, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 933, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 504, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 889, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/addons/web/controllers/main.py", line 877, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 681, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 672, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo/addons/base/module/module.py", line 410, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/opt/odoo/odoo/addons/base/module/module.py", line 484, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/opt/odoo/odoo/modules/registry.py", line 82, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo/modules/loading.py", line 339, in load_modules
    loaded_modules, update_module)
  File "/opt/odoo/odoo/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo/odoo/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/opt/odoo/odoo/modules/loading.py", line 95, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/opt/odoo/odoo/tools/convert.py", line 845, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/opt/odoo/odoo/tools/convert.py", line 915, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/opt/odoo/odoo/tools/convert.py", line 796, in parse
    self.parse(rec, mode)
  File "/opt/odoo/odoo/tools/convert.py", line 799, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/opt/odoo/odoo/tools/convert.py", line 707, in _tag_record
    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
  File "/opt/odoo/odoo/addons/base/ir/ir_model.py", line 1228, in _update
    record = record.create(values)
  File "/opt/odoo/odoo/addons/base/ir/ir_ui_view.py", line 360, in create
    return super(View, self).create(self._compute_defaults(values))
  File "/opt/odoo/odoo/models.py", line 3838, in create
    self._fields[key].determine_inverse(record)
  File "/opt/odoo/odoo/fields.py", line 1000, in determine_inverse
    getattr(records, self.inverse)()
  File "/opt/odoo/odoo/addons/base/ir/ir_ui_view.py", line 220, in _inverse_arch
    view.write(data)
  File "/opt/odoo/odoo/addons/base/ir/ir_ui_view.py", line 378, in write
    return super(View, self).write(self._compute_defaults(vals))
  File "/opt/odoo/odoo/models.py", line 3564, in write
    self._write(old_vals)
  File "/opt/odoo/odoo/models.py", line 3715, in _write
    self._validate_fields(vals)
  File "/opt/odoo/odoo/models.py", line 1083, in _validate_fields
    raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
ParseError: "Error while validating constraint

View inheritance may not use attribute 'string' as a selector.

Error context:
View `product.search.form`
[view_id: 1327, xml_id: n/a, model: product.product, parent_id: 380]
None" while parsing /opt/odoo/addons/product_brand/product_brand_view.xml:132, near
<record id="product_search_form_view" model="ir.ui.view">
            <field name="name">product.search.form</field>
            <field name="model">product.product</field>
            <field name="inherit_id" ref="product.product_search_form_view"/>
            <field name="arch" type="xml">
                <data><field name="categ_id" position="after">
                    <field name="product_brand_id"/>
                </field>
                <group string="Group by..." position="inside">
                    <filter string="Brand" name="groupby_brand" domain="[]" context="{'group_by' : 'product_brand_id'}"/>
                </group>
            </data></field>
        </record>
Avatar
Discard
Best Answer

Inheriting with STRING is deprecated from v10. So it will not work. 

Avatar
Discard
Best Answer

Hello !

The problem seems to come from product_brand module, i think the tag <data></data> is blocking the inheritance in the view. If you can touch the code, try to delete the <data></data> you can see in the error.


Edit : ok no the error seems to be in the <group> tag wich is called by his string attribute, it should be his name.

Follow this link : https://www.odoo.com/fr_FR/forum/aide-1/question/how-tow-solve-this-error-view-inheritance-may-not-use-attribute-string-as-a-selector-98147

Avatar
Discard
Related Posts Replies Views Activity
2
Jan 19
4830
0
Sep 16
2532
5
Dec 23
18212
2
Mar 15
5312
0
Mar 15
3942