Skip to Content
Menu
This question has been flagged
1 Reply
3596 Views

I have been trying to install the PRODUCT_BRAND for version 9. I've taken all the steps necessary, including it's folder but I keep getting:

Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 680, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 309, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 959, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 509, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 896, in call_button
    action = self._call_kw(model, method, args, {})
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 884, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/wizard/base_module_upgrade.py", line 87, in upgrade_module
    openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 385, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 338, in load_modules
    loaded_modules, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/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 "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 98, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 851, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 938, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 801, in parse
    self.parse(rec, mode)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 804, in parse
    self._tags[rec.tag](self.cr, rec, de, mode=mode)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 708, in _tag_record
    id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 1119, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 351, in create
    context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 354, in old_api
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4131, in create
    record = self.browse(self._create(old_vals))
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 490, in new_api
    result = method(self._model, cr, uid, *args, **old_kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4322, in _create
    recs._validate_fields(vals)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1270, in _validate_fields
    raise ValidationError('\n'.join(errors))
ParseError: "Invalid view definition

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

Error context:
View `product.search.form`
[view_id: 637, xml_id: n/a, model: product.product, parent_id: 291]
None" while parsing /var/lib/odoo/.local/share/Odoo/addons/9.0/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

Hello Scott,

You will find PR for V9 module https://github.com/OCA/product-attribute/pull/128/


You  can also check that  particular file https://github.com/OCA/product-attribute/pull/128/files

or

You can use this

<record id="view_product_template_search_brand" model="ir.ui.view">
<field name="name">product.template.search.brand</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="product_brand_id"/>
<filter string="Brand" name="groupby_brand" domain="[]"
context="{'group_by' : 'product_brand_id'}"/>
<separator/>
</field>
</field>
</record>


Thanks

Avatar
Discard
Author

I guess I'm confused about your comment Swapnesh. I already have the module added to odoo/addon.

Please See updated answer

Related Posts Replies Views Activity
4
Jun 24
6699
1
Feb 24
894
2
Mar 15
3689
1
Mar 15
4307
0
Mar 15
4000