Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
5 Antwoorden
17474 Weergaven

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.

Avatar
Annuleer
Beste antwoord

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.

Avatar
Annuleer
Auteur Beste antwoord

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

Avatar
Annuleer

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

regards

Beste antwoord

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>

Avatar
Annuleer
Beste antwoord

gh

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
4
jan. 24
23114
2
jan. 24
2421
0
aug. 23
2285
3
jan. 21
16558
0
dec. 19
3884