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.

1

Trouble with fields.char inheriting views in 7.0

By
Bruno Figares
on 1/1/14, 3:09 PM 775 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:

Model:

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),
    }
hr_employee_uy()

view:

<?xml version="1.0"?>
<openerp>
<data>
<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">
    <data>
        <group string="Citizenship & Other Info"> 
            <field name='country_of_birth'/>
        </group>
        <notebook>
            <page string='Datos de salud'>
                <field name='health_card_id' />
            </page>
        </notebook>
    </data>
    </field>
</record>
</data>
</openerp>

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.

7

Openies Services

--Openies Services--
925
| 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

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: 1/1/14, 3:09 PM
Seen: 775 times
Last updated: 3/16/15, 8:10 AM