Odoo Help


Trouble with fields.char inheriting views in 7.0

Bruno Figares
on 1/1/14, 3:09 PM 1,118 views

Hello, I'm puzzling over what seems to be valid xml and a valid model. If I remove the '<field name="health_card_id"/> it works and it shows an empty notebook page, the code is as follows:


class hr_employee_uy(osv.osv):

    _name = 'hr.employee'
    _inherit = 'hr.employee'
    _columns = {
        'country_of_birth':fields.many2one('res.country','Pais de nacimiento'),
        'health_card_id':fields.char('Numero de carne de salud',size=15),


<?xml version="1.0"?>
<record id="hr_employee_view" model="ir.ui.view" >
    <field name="name">hr.employee.form.inherit</field>
    <field name="model">hr.employee</field>
    <field name="inherit_id" ref="hr.view_employee_form"/>
    <field name="arch" type="xml">
        <group string="Citizenship & Other Info"> 
            <field name='country_of_birth'/>
            <page string='Datos de salud'>
                <field name='health_card_id' />

what problem am I having? the model itself doesn't seem to have a problem and as far as I understand this is valid and correct view syntax.

Thanks in advance.

Best regards, Bruno Figares.


Openies Services

--Openies Services--
| 2 2 4
Vadodara, India
--Openies Services--

We provide Odoo Services.

Contact us on : contact@openies.com

Openies Services
On 1/1/14, 3:13 PM

Here If you inherit model than no requirement of _name. So remove _name and update your module. It will work.

Hey, thanks for the quick answer. At first I tried your solution by updating the module and the problem persisted, afterwards I tried nuking the db and it worked just fine once I reinstalled the module. Thanks for the help!

Bruno Figares
on 1/1/14, 3:26 PM

You are Welcome Mr Bruno. In future if you need any help contact us on openies.com@gmail.com.

Openies Services
on 2/16/14, 5:18 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/1/14, 3:09 PM
Seen: 1118 times
Last updated: 3/16/15, 8:10 AM