为什么向导视图找不到模型?

Why Wizard view cannot find the model?

我在 odoo 中制作了一个简单的向导,我想展示该向导,但是我的模型无法找到我的视图。我的简单代码有什么问题?

这是我的精灵

class RequestReceiveWizard(models.TransientModel):

_name ='estate.nursery.requestreceivewizard'

# def _default_session(self):
#     return self.env['estate.nursery.requestline'].browse(self._context.get('request_id'))
name=fields.Char("Wizard name")
request_id=fields.Many2one('estate.nursery.request')
requestline_ids = fields.Many2many("estate.nursery.requestline")

这是我的观点:

 <!--request Wizard -->
    <record model="ir.ui.view" id="request_view_wizard">
        <field name="name">Request receive wizard</field>
        <field name="model">estate.nursery.requestreceivewizard</field>
        <field name="arch" type="xml">
            <form string="Wizard For Request Received">
                    <group  collspan="2" col="2">
                        <field name="name"/>
                        <field name="requestline_ids"/>
                    </group>
                <footer>
                    <button name="Apply" type="Action" string="Apply" >Apply</button>
                    <button special="cancel" string="Cancel">Cancel</button>
                </footer>
            </form>
        </field>
    </record>

    <act_window id="received_request_wizard" name="Request Wizard"
                    src_model="estate.nursery.request"
                    res_model="estate.nursery.requestreceivewizard"
                    view_mode="form"
                    target="new"
                    multi="True" key2="client_action_multi"/>

我的简单代码有什么问题?这是我的错误

Model not found: estate.nursery.requestreceivewizard

act_window 替换为该记录并尝试此代码:

 <record id="received_request_wizard" model="ir.actions.act_window">
        <field name="name">estate.nursery.request</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">estate.nursery.request</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="request_view_wizard"/>
        <field name="target">new</field>
    </record>

可能对你有用...