Odoo 显示库存调整可用产品字段列表(查找条形码字段)

Odoo 显示库存调整可用产品字段列表(查找条形码字段),odoo,odoo-11,Odoo,Odoo 11,我想将我的产品条形码添加到库存调整中库存列表中的产品列表中。查看列表为: <?xml version="1.0"?> <tree editable="top" string="Inventory Details" decoration-info="product_qty != theoretical_qty" decoration-danger="theoretical_qty &lt; 0"> <field name="product_id" do

我想将我的产品条形码添加到库存调整中库存列表中的产品列表中。查看列表为:

<?xml version="1.0"?>
<tree editable="top" string="Inventory Details" decoration-info="product_qty != theoretical_qty" decoration-danger="theoretical_qty &lt; 0">
    <field name="product_id" domain="[('type','=','product')]"/>
    <field name="product_uom_id" string="UoM" groups="product.group_uom"/>
    <field name="location_id" domain="[('id', 'child_of', inventory_location_id)]" groups="stock.group_stock_multi_locations"/>
    <field name="prod_lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/>
    <field name="package_id" domain="['|', ('location_id','=', False), ('location_id', '=', location_id)]" groups="stock.group_tracking_lot"/>
    <field name="partner_id" groups="stock.group_tracking_owner"/>
    <field name="theoretical_qty" readonly="1"/>
    <field name="product_qty" string="Real Quantity"/>
    <field name="state" invisible="1"/>
    <field name="inventory_id" invisible="1"/>
    <field name="inventory_location_id" invisible="1"/>
</tree>

如果我尝试添加字段
,我会被告知:

字段产品标识条形码不存在


如何查看可以添加到此列表中的所有字段?

似乎无法在XML视图中浏览整个模型。 您可以向在此视图中显示的模型添加一个相关字段,基本上如下所示:
barcode=fields.Char(related='product\u id.barcode')
,然后您可以在视图中显示它: