Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

To many values to unpack

By
Juan Carlos Falcón
on 12/30/13, 6:23 AM 3,058 views

Hi,

I'm trying inkerit a view, "edit_holidays_new" but when update the module I get error. Attach code.

<openerp>
    <data>
        <record model="ir.ui.view" id="inz_rh_holidays_view_inherit">
            <field name="name">hr.holidays.form.inherit</field>
            <field name="model">hr.holidays</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="hr.holidays.edit_holiday_new">form</field>
            </field>
        </record>
    </data>
</openerp>

Regards

Could you post the server log that shows the error you get?

Gustavo
on 12/30/13, 6:52 AM
0

Grover Menacho

--Grover Menacho--
2523
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 12/30/13, 8:52 AM

If you are using OpenERP 7, this is not needed:

<field name="type">form</field>

And this is not in the right way:

<field name="inherit_id" ref="hr.holidays.edit_holiday_new">form</field>

Correct way:

<openerp>
<data>
    <record model="ir.ui.view" id="inz_rh_holidays_view_inherit">
        <field name="name">hr.holidays.form.inherit</field>
        <field name="model">hr.holidays</field>
        <field name="inherit_id" ref="hr.holidays.edit_holiday_new"/>
        <field name="arch" type="xml">
            <!-- Your code -->
        </field>
        </field>
    </record>
</data>

</openerp>

Ok. Solution:<openerp> <data> <record model="ir.ui.view" id="inz_rh_hr_holidays_view_inherit"> <field name="name">hr.holidays.form.inherit</field> <field name="model">hr.holidays</field> <field name="inherit_id" ref="hr_holidays.edit_holiday_new">form</field> <field name="arch" type="xml"> <button name='validate' position='replace'/> </field> </record> </data> </openerp>

Juan Carlos Falcón
on 12/30/13, 1:01 PM
0
Juan Carlos Falcón
On 12/30/13, 8:25 AM
OpenERP Server Error
Client Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/web/http.py", line 203, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/web/controllers/main.py", line 1133, in call_button
    action = self._call_kw(req, model, method, args, {})
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/web/controllers/main.py", line 1121, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/web/session.py", line 43, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/base/module/module.py", line 513, in button_immediate_upgrade
    return self._button_immediate_function(cr, uid, ids, self.button_upgrade, context=context)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/addons/base/module/module.py", line 475, in _button_immediate_function
    _, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/pooler.py", line 39, in restart_pool
    registry = RegistryManager.new(db_name, force_demo, status, update_module)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/modules/registry.py", line 218, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/modules/loading.py", line 344, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/modules/loading.py", line 259, 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.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/modules/loading.py", line 191, in load_module_graph
    load_data(module_name, idref, mode)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/modules/loading.py", line 76, in <lambda>
    load_data = lambda *args: _load_data(cr, *args, kind='data')
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/modules/loading.py", line 127, in _load_data
    tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/tools/convert.py", line 954, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/tools/convert.py", line 805, in _tag_record
    f_val = self.id_get(cr, f_ref)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/tools/convert.py", line 824, in id_get
    res = self.model_id_get(cr, id_str)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130408_232357-py2.6.egg/openerp/tools/convert.py", line 832, in model_id_get
    mod,id_str = id_str.split('.')
ValueError: too many values to unpack

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/30/13, 6:23 AM
Seen: 3058 times
Last updated: 3/16/15, 8:10 AM