This question has been flagged
4 Replies
9619 Views

I tried creating a new module using the web interface using this video as a guide:

youtube.com/watch?v=RrXrxuAKFRY

Everything was good until I faced the problem of not being able to create a form view as the person did in the video (3min 10sec) . I did the exact steps he did but to no avail.

Also, when I try to create a view from User Interface > Views the view type is fixed to "Tree"

am i missing something? Can someone help me?

Avatar
Discard
Best Answer

The video you linked to shows a workaround for creating new form views, wherein you can use "Manage Views" from the debug menu to change the view type to "form" after creating a temporary "tree" view.

As of the time of this answer, there is a bug in the bundled form view for creating/editing form views, "ir.ui.views form". The "type" field in the model for views has a "readonly" attribute, so you'll need to override that attribute in the form:

If you go to Settings / User Interface / Views and search for "ir.ui.view", you can correct the bug in the view quite easily. Change <field name="type"/> to <field name="type" readonly="0"/>. It should look something like this when you're done:

<?xml version="1.0"?>
<form string="Views" version="7.0">
    <sheet>
        <group>
            <group>
                <field name="name"/>
                <field name="type" readonly="0"/>
                <field name="model"/>
                <field name="priority"/>
            </group>
            <group>
                <field name="field_parent"/>
                <field name="inherit_id"/>
                <field name="xml_id"/>
            </group>
        </group>
        <notebook>
            <page string="Architecture">
                <field name="arch"/>
            </page>
            <page string="Groups">
                <field name="groups_id"/>
            </page>
        </notebook>
    </sheet>
</form>

(Bug reports relating to this issue have already been filed, such as: bugs.launchpad.net/openobject-server/+bug/1103788 )

Avatar
Discard
Best Answer

Hi,

you can start with this post : https://accounts.openerp.com/forum/Help-1/question/16336#16338

Avatar
Discard
Author

Thanks but I already did and that's how I came across the video i mentioned and as I said,

Can you please help with a straight forward specific answer?

I appreciate it.

Author Best Answer

Thanks but I already did and that's how I came across the video i mentioned and as I said,

Can you please help with a straight forward specific answer?

I appreciate it.

Avatar
Discard
Best Answer

Sorry if this is late, but the way to manage that issue, follow this steps:

Go to Settings / User Interface / Views, and find the the tree view you create at the begining and click it, then just click in More/ Duplicate button, then change the name of the view, the type of view from tree to Form, and in the xml code change the word tree to form.

Now you can go to your module and you will find your form view.

It works for me, hope it helps

Avatar
Discard