<?xml version="1.0" encoding="utf-8" ?>
<odoo>
     <record id="view_move_form" model="ir.ui.view">
        <field name="name">account_view_move_form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="arch" type="xml">
             <xpath expr="//field[@name='invoice_line_ids']//tree" position="inside">
                <field name="external_name" />
            </xpath>
            <xpath
                expr="//field[@name='invoice_line_ids']//tree//field[@name='name']"
                position="attributes"
            >
                <attribute name="invisible">1</attribute>
            </xpath>
            <xpath expr="//field[@name='invoice_line_ids']//form" position="inside">
                <field name="external_name" />
            </xpath>
        </field>
    </record>
</odoo>

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
     <record id="view_move_form" model="ir.ui.view">
        <field name="name">account_view_move_form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="arch" type="xml">
             <xpath expr="//field[@name='invoice_line_ids']//tree" position="inside">
                <field name="external_name" />
            </xpath>
            <xpath
                expr="//field[@name='invoice_line_ids']//tree//field[@name='name']"
                position="attributes"
            >
                <attribute name="invisible">1</attribute>
            </xpath>
            <xpath expr="//field[@name='invoice_line_ids']//form" position="inside">
                <field name="external_name" />
            </xpath>
            <!--
            WARNING: We need to display the field as invisible here although it
             is already defined on invoice_line_ids tree above. Having it
             defined only there would only set the external_name key with its
             value inside the invoice_line_ids key of the values dictionary
             that is passed to create function. However, this invoice_line_ids
             key is popped in account.move._move_autocomplete_invoice_lines_create
             function to keep only the line_ids to create the account.move and
             avoid duplicated account.move.line records. -->
            <xpath expr="//field[@name='line_ids']//tree" position="inside">
                <field name="external_name" invisible="1" />
            </xpath>
        </field>
    </record>
</odoo>

Add external_name to account.move.line_ids view
Add external_name to account.move.line_ids view

We need to display the field as invisible here although it
is already defined on invoice_line_ids tree above. Having it
defined only there would only set the external_name key with its
value inside the invoice_line_ids key of the values dictionary
that is passed to create function. However, this invoice_line_ids
key is popped in account.move._move_autocomplete_invoice_lines_create
function to keep only the line_ids to create the account.move and
avoid duplicated account.move.line records.
