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.

0

Not displaying the form and tree view

By
charlesraj
on 5/31/13, 7:31 AM 2,091 views

hai i created a new test module and installed it on openerp. but the problem is after installation the menu will be appeared. when i clicked on it the submenu will be appeared . but there is no form view,tree view will appear. the code for the view be given.

<openerp>

<data>

   <record model='ir.ui.view' id='test_base_form'>

       <field name='name'>test.base.form</field>

           <field name='model'>test.base</field>


           <field name='arch' type='xml'>

               <form string='Test Base'>

                   <field name='name'/>

                   <field name='code'/>

               </form>

          </field>

    </record>

    <record model='ir.ui.view' id='test_base_tree'>

        <field name='name'>test.base.tree</field>

        <field name='model'>test.base</field>

        <field name='arch' type='xml'>

            <tree string='Test Base'>

                <field name='name'/>

                <field name='code'/>

            </tree>

        </field>

    </record>

    <record model='ir.actions.act_window' id='action_test_seq'>

        <field name='name'>Test Base</field>

        <field name='res_model'>test.base</field>

        <field name='view_type'>form</field>

        <field name='view_mode'> tree,form</field>

    </record>

    <menuitem id='menu_test_base_main' name='Test Base'/>

    <menuitem id='menu_test_base' parent='menu_test_base_main'

              name='Test Base' action='action_test_seq'/>

</data>

</openerp> ..is there any problem in the code. please help.

3

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 6/1/13, 7:40 AM

This line:

<field name='view_mode'> tree,form</field>

must be:

<field name='view_mode'>tree,form</field>

The error is the space before the word tree.

1
charlesraj
On 6/3/13, 4:13 AM

hi i found the solution. Specifying the action "ir.actions.act_window" for the parent menu .

do not add your explanation as new answer you should know that

regards

Maath
on 6/16/13, 4:58 AM
0
Paramita
On 5/26/16, 11:24 AM

gh

0
Ali Ravani
On 6/1/13, 7:25 AM

Replace every single quote(') with double quote (").........

<data>

<record model="ir.ui.view" id="test_base_form">

   <field name="name">test.base.form</field>

       <field name="model">test.base</field>

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

       <field name="arch" type="xml">

           <form string="Test Base">

               <field name="name"/>

               <field name="code"/>

           </form>

      </field>

</record>

<record model="ir.ui.view" id="test_base_tree">

    <field name="name">test.base.tree</field>

    <field name="model">test.base</field>

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

    <field name="arch" type="xml">

        <tree string="Test Base">

            <field name="name"/>

            <field name="code"/>

        </tree>

    </field>

</record>

<record model="ir.actions.act_window" id="action_test_seq">

    <field name="name">Test Base</field>

    <field name="res_model">test.base</field>

    <field name="view_type">form</field>

    <field name="view_mode"> tree,form</field>

</record>

<menuitem id="menu_test_base_main" name="Test Base"/>

<menuitem id="menu_test_base" parent="menu_test_base_main"

          name="Test Base" action="action_test_seq"/>

</data>

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

0 follower(s)

Stats

Asked: 5/31/13, 7:31 AM
Seen: 2091 times
Last updated: 5/26/16, 11:24 AM