Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
5751 Представления

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.

Аватар
Отменить

If you are debugging, please post the entire error.

Лучший ответ

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

Аватар
Отменить
Автор Лучший ответ

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>
Аватар
Отменить