试图将一个模块从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>发布于 2019-03-06 19:32:41
您所得到的错误说明外部ID不存在。您会得到这个错误,因为虽然stock_account模块仍然存在于Odoo 12中,但是视图(view_picking_inherit_form2)并不存在。
您需要确定要从哪个Odoo 12视图继承-最有可能是stock.view_picking_form。
但是,您还需要查看该表单的内容,因为自Odoo 10以来已经发生了很大变化。例如,您试图更改attributes on (move_lines)的字段也不存在;它被move_ids_without_package替换。
继承视图在12中或多或少是一样的,但是在将任何视图内容迁移到Odoo 12之前,您需要问自己几个问题。
这里有一个指向视图文档的链接
https://stackoverflow.com/questions/55027549
复制相似问题