omas
omas

Reputation: 79

ODOO 12.0 MIGRATION: External ID not found in the system: stock_account

Trying to migrate a module from odoo 10 to odoo 12 but it shows me this error,it seems that stock_account doesn't exist.

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>

Upvotes: 0

Views: 1705

Answers (1)

Travis Waelbroeck
Travis Waelbroeck

Reputation: 2135

The error you are getting says that the External ID does not exist. You're getting this error because, while the stock_account module still exists in Odoo 12, the view (view_picking_inherit_form2) does not exist.

You need to determine which Odoo 12 view you want to inherit from - most likely stock.view_picking_form.

However, you also need to look at the contents of that form because a lot has changed since Odoo 10. For example, the field you are trying to change attributes on (move_lines) does not exist either; it is replaced by move_ids_without_package.


Inheriting views is more or less the same in 12, but before you migrate any of your view contents to Odoo 12, you need to ask yourself a few questions.

  1. Do I even need to do this in 12?
  2. Does the module I inherit from exist in 12?
  3. Does the view I inherit from exist in 12?
  4. Are the view contents the same in 12?

Here's a link to the Views Documentation

Upvotes: 1

Related Questions