odoo向导无法继承模型

odoo wizard cant inherit the model

我创建了一个这样的模型

class FoundCheque(models.TransientModel):
    _name = "found.cheque"


    date_Found = fields.Date(string='Found Date', default=fields.Date.context_today, required=True, translate=True)

及其观点

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <data>
        <record model="ir.ui.view" id="wizard_found_cheque">
            <field name="name">found.cheque.wizard</field>
            <field name="model">found.cheque</field>
            <field name="arch" type="xml">
                <form string="found Cheque">
                    <group>
                        <field name="date_found" style="width:40%%"/>
                    </group>
                    <footer>
                        <button name="found_cheque" string="Post" type="object" class="oe_highlight"/>
                        or <button string="Cancel" class="oe_link" special="cancel"/>
                    </footer>
                </form>
            </field>
        </record>
    </data>
</odoo>

但是当我尝试在重启服务后更新模块时 它只是说:

Field `date_found` does not exist

Error context:
View `found.cheque.wizard`
[view_id: 4100, xml_id: n/a, model: found.cheque, parent_id: n/a]
None" while parsing /opt/odoo/odoo11-custom-addons/cheque_management/views/found_cheque.xml:4, near
<record model="ir.ui.view" id="wizard_found_cheque">
            <field name="name">found.cheque.wizard</field>
            <field name="model">found.cheque</field>
            <field name="arch" type="xml">
                <form string="found Cheque">
                    <group>
                        <field name="date_found" style="width:40%%"/>
                    </group>
                    <footer>
                        <button name="found_cheque" string="Post" type="object" class="oe_highlight" confirm="آیا مطمئن هستید؟"/>
                        or <button string="Cancel" class="oe_link" special="cancel"/>
                    </footer>
                </form>
            </field>
        </record>

补充一下,我重启了几次服务

将根据要求添加更多信息

模型中定义的字段是“date_Found”,向导中定义的字段是“date_found”

F

您在 python 文件中的字段名称是 date_Found 和 xml 中的 date_found。两者不同。所以在 xml 文件

中更改字段名称