콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
8493 화면

Hi, i'm using OpenERP 7.0.

I've extended res.partner model and I've created custom form and trees in my custom module for a res.partner model. I've created three actions and 1 menu. It works fine, the only thing that is not working is that when I click the menu, an empty forms is being showed, instead of the tree with

    <record id="action_menora_socios" model="ir.actions.act_window">
        <field name="name">Socios</field>
        <field name="res_model">res.partner</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="domain">[('apellido','<>',False)]</field>
        <field name="help">Gestionar la base de socios, relaciones, asistencia a cursos y eventos</field>
    </record>

    <record id="action_menora_socios_tree" model="ir.actions.act_window">
        <!-- <field eval="1" name="sequence"/>  -->
        <field name="view_type">tree</field>
        <field name="view_id" ref="view_socios_menora_tree"/>
        <field name="act_window_id" ref="action_menora_socios"/>
    </record>

    <record id="action_menora_socios_tree" model="ir.actions.act_window">
        <!--<field eval="0" name="sequence"/> -->
        <field name="view_type">form</field>
        <field name="view_id" ref="view_socios_menora_form"/>
        <field name="act_window_id" ref="action_menora_socios"/>
    </record>

    <menuitem action="action_menora_socios" id="menu_menora_socios" 
            parent="menora.menu_gestion_socios" sequence="10" groups="base.group_user"/>

Is there something i'm doing wrong?

아바타
취소

Why are you creating three act.windows?

작성자

Because i need two custom views, one for the form and the other for the tree.

베스트 답변

Marcelo Hamra

Here you make a silly mistack on id of record. You give the same id in the ir.actions.act_window (id="action_menora_socios_tree"). Change the one Id as _form and it will work

아바타
취소
베스트 답변

use sequence in the action of the respective tree and form views  as follows

Dont forget to give a lower sequence number for the tree action(gives it high priority) 

eg for tree action:

            <field name="sequence">1</field>

and for form action

            <field name="sequence">6</field>

아바타
취소
베스트 답변

use sequence in the action of the respective tree and form views  as follows

Dont forget to give a lower sequence number for the tree action(gives it high priority) 

eg for tree action:

            <field name="sequence">1</field>

and for form action

            <field name="sequence">6</field>

아바타
취소
관련 게시물 답글 화면 활동
0
3월 15
5903
0
3월 15
4150
3
5월 20
7728
0
5월 15
3667
0
3월 15
4033