我创建了模型 boygirl (都具有属性名称,姓氏,年龄),这些模型与表 love_date (boy_id,girl_id,relationship_level)相关 .

模型 boy 有一个one2many列(love_dates),它通过字段 boy_id 指向 love_date . 与模型 girl 相同,通过字段 girl_id . 模型 love_date 的字段为 boy_idgirl_id ,其中许多字段指向模型 boygirl .

现在我已经介绍了我的环境,我将解释这个问题:

我正在 boy 的形式,我在看板视图中显示他的 love_dates (就像你随时看到res.partner形式的标签联系人一样) .

问题是我无法显示与当前男孩约会的女孩的数据 .

<field name="love_dates" mode="kanban">
    <kanban>
        <field name="boy_id"/>
        <field name="girl_id"/>
        <field name="relationship_type"/>
        <templates>
        <t t-name="kanban-box">
            <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; display: inline-block">X</a>
            <div class="oe_module_vignette">
                <a type="open">
                    <t t-if="record.girl_id.has_image === true">
                        <img t-att-src="kanban_image('girl', 'image_small', record.girl_id.id.value)" class="oe_avatar oe_kanban_avatar_smallbox"/>
                    </t>
                    <t t-if="record.girl_id.image !== false">
                        <img t-att-src="'data:image/png;base64,'+record.girl_id.image" class="oe_avatar oe_kanban_avatar_smallbox"/>
                    </t>
                </a>
                <div class="oe_module_desc">
                    <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
                        <table class="oe_kanban_table">
                            <tr>
                                <td class="oe_kanban_title1" align="left" valign="middle">
                                    <h4>
                                        <a type="open">
                                                <t t-esc="record.girl_id.name"/>
                                                <t t-esc="record.girl_id.surname"/>
                                                <t t-esc="record.girl_id.age"/>
                                                <t t-esc="record.relationship_type"/>
                                        </a>
                                    </t>
                                </td>
                        </table>
                    </div>
                </div>
            </div>
        </t>
    </kanban>
</field>

我无法看到女孩的形象,姓氏,年龄......我只能看到他们的名字和关系类型 .

有人可以帮帮我吗?先感谢您 .