使用自定义模块在看板odoo 11视图中执行操作时出错

时间:2019-03-31 02:37:50

标签: xml python-3.x odoo odoo-11

在ODOO 11中,我有一个带有FORM视图和TREE视图的自定义模块,但是,我现在试图使KANBAN视图在对执行的ACTIONS进行编程时抛出一个错误。您能帮我解决一下吗?

错误消息:

  File "/odoo/odoo-server/odoo/addons/base/ir/ir_model.py", line 1332, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
odoo.tools.convert.ParseError: "External ID not found in the system: employee_car_request.action_all_customers" while parsing /odoo/custom/addons/employee_car_request/views/views.xml:95, near
<record id="action_all_customers_kanban" model="ir.actions.act_window.view">
            <field name="act_window_id" ref="action_all_customers"/>
            <field name="view_id" ref="kanban_all_customers"/>
            <field name="view_mode">kanban</field>
            <field name="sequence">17</field>
        </record>

这是在Ubuntu Server的ODOO 11 Comunity版本中执行KANBAN视图,模型是:car.request

views.xml,进行建模:employee_car_request

      <record id="kanban_all_customers" model="ir.ui.view">
                <field name="model">car.request</field>
                <field name="arch" type="xml">
                        <kanban>
                                <field name="name" />
                                <field name="date_from" />
                                        <templates>
                                                <t t-name="kanban-box">
                                                        <div class="oe_kanban_card">
                                                                <field name="name" />
                                                        </div>
                                                </t>
                                        </templates>
                        </kanban>
                </field>
        </record>

        <record id="action_all_customers_kanban" model="ir.actions.act_window.view">
                <field name="act_window_id" ref="action_all_customers" />
                <field name="view_id" ref="kanban_all_customers" />
                <field name="view_mode">kanban</field>
                <field name="sequence">17</field>
        </record>

我正在使用的部分模型如下:

class CarRequest(models.Model):
    _name = "car.request" # Table in DB => car_request
    _inherit = ['mail.thread']
    _description = "Car Request"

    name = fields.Char(string="Request", required=True, )
    date_from = fields.Datetime(string="Starting Date", default=fields.Datetime.now(),)
    author_ids = fields.Many2many(
    'res.partner',
    string='Authors',
    track_visibility='onchange',
    )

0 个答案:

没有答案