Skip to Content
Menu
This question has been flagged
2 Replies
5577 Views

I've been stuck in this error since 4 hours ago. I searched everywhere, copy the right solutions, but nothing changes.

class jobsopen(osv.osv):
    _name = 'jobsopen.jobsopen'
    _columns = {
                    'name':fields.char('Name', size=20, required = True),
               }    
<?xml version="1.0"?>
<openerp>
    <data>
        <record id="jobsopen_jobsopen_tree_view" model="ir.ui.view">
        <field name="name">jobsopen.jobsopen.tree</field>
        <field name="model">jobsopen.jobsopen</field>
        <field name="arch" type="xml">
            <tree string="Jobs">
                <field name="name"/>
            </tree>
        </field>
    </record>
    </data>
</openerp>

I already tried to put:

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

But it continues not to work.

Avatar
Discard

If you are debugging, please post the entire error.

Best Answer

for one you do not have an ending for you class. Did you create all the other required files, __init__.py and openerp.py and in the openerp.py, did you declare the to update the view of module? Restart your server and reload the module in the web client. Restarting help update the python while reloading or upgrading the module in the web client will ensure your xml view is updated

Avatar
Discard
Author Best Answer

Hey guys,

Primarily, thanks for the fast answer. I just solved the issue. It seems that I wasn't put the right terms in the XML. Said this, my tree now look like this, and it's working perfectly.

<record model="ir.ui.view" id="jobsopen_tree">
        <field name="name">jobsopen.tree</field>
        <field name="model">jobsopen.jobsopen</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="jobsopen tree">
                <field name="name"/>
            </tree>
        </field>
    </record>
Avatar
Discard