widget one2many on webclient not working.
Hello.
I'm running V.5.0.10 and i was creating a new module but it keeps throwing an error.
My py file:
from mx import DateTime
import time
from osv import fields, osv
class hr_employee(
_name=
_inherit=
_columns = {
'foto': fields.
}
_defaults = {
}
hr_employee()
class hr_employee_
_name = 'hr.employee.
_description = "Linha de Avaliacao de RH"
_columns = {
'periodo': fields.selection([
('1º Semestre', '2º Semestre'
'nota': fields.
}
_defaults = {
'ano': lambda *a: time.strftime(
'periodo': lambda *a: '1º Semestre',
'nota' : lambda *a: 3.0
}
hr_employee_
My xml view file:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="hr_
<field name="name"
<field name="model"
<field name="type"
<field name="inherit_id" ref="hr.
<field name="arch" type="xml">
</record>
<record model="ir.ui.view" id="hr_
<field name="name"
<field name="model"
<field name="type"
<field name="inherit_id" ref="hr.
<field name="arch" type="xml">
</record>
<record model="ir.ui.view" id="view_
<field name="name"
<field name="model"
<field name="type"
<field name="arch" type="xml">
</record>
<record model="ir.ui.view" id="hr_
<field name="name"
<field name="model"
<field name="type"
<field name="inherit_id" ref="hr.
<field name="arch" type="xml">
</record>
</data>
</openerp>
The module is correctly imported and installed without errors, but when trying access the view that should contain the widget like the avaliacao_ids, OpenERP will throw the following:
File "service\
File "osv\osv.pyo", line 58, in wrapper
File "osv\osv.pyo", line 119, in execute
File "osv\osv.pyo", line 111, in execute_cr
File "osv\orm.pyo", line 1369, in fields_view_get
File "osv\orm.pyo", line 1118, in __view_
File "osv\orm.pyo", line 1113, in __view_look_dom
File "osv\orm.pyo", line 1113, in __view_look_dom
File "osv\orm.pyo", line 1113, in __view_look_dom
File "osv\orm.pyo", line 1061, in __view_look_dom
File "osv\orm.pyo", line 1156, in __view_
File "osv\orm.pyo", line 2214, in fields_get
File "osv\orm.pyo", line 1002, in fields_get
ValueError: too many values to unpack
However if i remove the part of the view correcponding to the avaliacao_ids (the widget), all other views work well, but i do not know how any more ways to fix it, even after looking into other modules source code.
In case of any suggestion, ill appreciate it :)
Regards.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- OpenERP Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- gustavo palminha
- Solved:
- Last query:
- Last reply: