ODOO 12.0 MIGRATION:系统中找不到外部ID:stock_account

问题描述 投票:0回答:1

尝试将模块从odoo 10迁移到odoo 12,但它向我显示了这个错误,似乎stock_account不存在。

raise ValueError('External ID not found in the system: %s' % xmlid)
    odoo.tools.convert.ParseError: "External ID not found in the system: stock_account.view_picking_inherit_form2" while parsing /home/*/PycharmProjects/Odoo12/*/invoice_in_picking/views/stock_view.xml:37, near
    <record id="view_picking_inherit_form3" model="ir.ui.view">
                <field name="name">stock.picking.form.inherit3</field>
                <field name="model">stock.picking</field>
                <field name="inherit_id" ref="stock_account.view_picking_inherit_form2"/>
                <field name="arch" type="xml">
                    <field name="move_lines" position="attributes">
                        <attribute name="context">{'default_invoice_state': invoice_state, 'address_in_id': partner_id, 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree', 'default_picking_type_id': picking_type_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}</attribute>
                    </field>
                </field>
            </record>
xml odoo odoo-10
1个回答
1
投票

您收到的错误表明外部ID不存在。你得到这个错误是因为,虽然stock_account模块仍然存在于Odoo 12中,但视图(view_picking_inherit_form2)不存在。

您需要确定要从哪个Odoo 12视图继承 - 很可能是stock.view_picking_form

但是,您还需要查看该表单的内容,因为自Odoo 10以来已经发生了很多变化。例如,您尝试更改attributesmove_lines)的字段也不存在;它被move_ids_without_package取代。


继承视图在12中或多或少相同,但在将任何视图内容迁移到Odoo 12之前,您需要问自己一些问题。

  1. 我甚至需要在12岁时做到这一点吗?
  2. 我继承的模块是否存在于12?
  3. 我继承的观点是否存在于12?
  4. 12中的视图内容是否相同?

这是the Views Documentation的链接

© www.soinside.com 2019 - 2024. All rights reserved.