コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3871 ビュー

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.

アバター
破棄