将表与另一个表的字段相关

时间:2019-09-23 05:15:10

标签: python odoo

我希望另一个表的属性显示在一个表中,但出现错误。 我有以下代码:

    <field name = "name"> Move detail list </field>

    <field name = "model"> spare parts_calderon.detalle_movimiento </field>

    <field name = "arch" type = "xml">

        <tree>

        <field name = "id" />

        <field name = "detail_date" />

        <field name = "activity_type" />

        <field name = "input_number" />

        <field name = "quantity_output" />

        <field name = "total_product_price" />

        <field name = "movement_id" />

        </tree>

        <field name = "product_id">

            <tree>

            <field name = "purchase_price" />

            <field name = "sale_price" />

            </tree>

        </field>

    </field>

    </record>

当我运行此代码时,执行odoo时出现的错误如下:

Uncaught TypeError: Cannot read property 'type' of undefined
http: // localhost: 8069 / web / content / 354-64ca6d1 / web.assets_backend.js: 1954
Error Tracking:
TypeError: Cannot read property 'type' of undefined
    at Class._renderBodyCell (http: // localhost: 8069 / web / content / 354-64ca6d1 / web.assets_backend.js: 1954: 132)
    at http: // localhost: 8069 / web / content / 354-64ca6d1 / web.assets_backend.js: 1970: 132
    at Function ._. map ._. collect (http: // localhost: 8069 / web / content / 353-a495bb1 / web.assets_common.js: 13: 270)
    at Class._renderRow [as _super] (http: // localhost: 8069 / web / content / 354-64ca6d1 / web.assets_backend.js: 1970: 82)
    at Class._renderRow (http: // localhost: 8069 / web / content / 354-64ca6d1 / web.assets_backend.js: 1911: 71)
    at Class._renderRow (http: // localhost: 8069 / web / content / 353-a495bb1 / web.assets_common.js: 3541: 371)
    at Function ._. map ._. collect (http: // localhost: 8069 / web / content / 353-a495bb1 / web.assets_common.js: 13: 270)
    at Class._renderRows (http: // localhost: 8069 / web / content / 354-64ca6d1 / web.assets_backend.js: 1971: 85)
    at Class._renderRows (http: // localhost: 8069 / web / content / 354-64ca6d1 / web.assets_backend.js: 1912: 67)
    at Class._renderRows (http: // localhost: 8069 / web / content / 353-a495bb1 / web.assets_common.js: 3541: 371)

我做错了什么。

0 个答案:

没有答案