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

Hi, I want to display two notebook pages. In each one, I want a tree of a many2many field (municipio). It works fine with each page separately, but when I put both pages, the second one overrides the first one.

Is there any way I can make this work?

                        <notebook>
                            <page string="Servicios">
                                <field name="municipio" >
                                    <tree version="7.0" editable="bottom">
                                        <field name="nombre"/>
                                        <field name="org_pliego" string="Pliego"/>
                                        <field name="org_mejoras" string="Mejoras"/>
                                    </tree>
                                </field>
                            </page>
                            <page string="Voluminosos">
                                <field name="municipio" >
                                    <tree version="7.0">
                                        <field name="nombre"/>
                                        <field name="puerta_pliego" string="Puerta a puerta: Pliego"/>
                                        <field name="puerta_mejoras" string="Mejoras"/>
                                    </tree>
                                </field>
                            </page>
                        </notebook>

아바타
취소
작성자

Sorry, but it seems I can't comment your answer, Valsily. The duplicated field doesn't seem to be the problem, as I have removed it, and the problem persists. It has to be a problem with the tree inline declaration, as if there can be only one tree per model, and I am defining two, so the second one overrides the first.

베스트 답변

You can't use one field twice in one view. You need create duplicate of your filed by defining functional field that will return value of your first filed.

아바타
취소