Odoo - 无法扩展 stock.view_picking_form 视图

Odoo - Impossible to extend stock.view_picking_form view

我尝试使用外部 ID stock.view_picking_form 扩展视图,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
        <record model="ir.ui.view" id="cap_stock.stock_picking_form">
            <field name="name">cap_stock.stock_picking_form</field>
            <field name="model">stock.picking</field>
            <field name="inherit_id" ref="stock.view_picking_form" />
            <field name="arch" type="xml">

                <xpath expr="//button[@name='action_assign']"  position="replace">
                    <button name="action_assign" invisible="1"/>
                </xpath>

        </record>


</data>
</openerp>

但我总是得到

ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition

Error details:
Model not found: stock.picking

Error context:
View `cap_stock.stock_picking_form`
[view_id: 996, xml_id: n/a, model: stock.picking, parent_id: 722]" while parsing /var/www/cbl_openerp/openerp/cap_addons/cap_stock/data.xml:4, near

我错过了什么?

为什么模型 stock.picking 无法识别?

我没有在依赖 __openerp__.py 文件中添加 'stock'。

可以通过查看文件或执行此查询来检查:

select * from ir_model where model='stock.picking'
select * from stock_picking