<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!-- Copyright 2013-2014 Alexis de Lattre <alexis.delattre@akretion.com>
         License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
    <record id="invoice_form" model="ir.ui.view">
        <field name="name">related.pickings.account.invoice.form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="arch" type="xml">
            <div name="button_box" position="inside">
                <field name="picking_ids" invisible="1" />
                <button
                    name="action_show_picking"
                    class="oe_stat_button"
                    icon="fa-truck"
                    type="object"
                    attrs="{'invisible': [('picking_ids', '=', [])]}"
                    string="Pickings"
                >
                </button>
            </div>
        </field>
    </record>
</odoo>

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!-- Copyright 2013-2014 Alexis de Lattre <alexis.delattre@akretion.com>
         License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
    <record id="invoice_form" model="ir.ui.view">
        <field name="name">related.pickings.account.invoice.form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="arch" type="xml">
            <div name="button_box" position="inside">
                <field name="picking_ids" invisible="1" />
                <button
                    name="action_show_picking"
                    class="oe_stat_button"
                    icon="fa-truck"
                    type="object"
                    attrs="{'invisible': [('picking_ids', '=', [])]}"
                    string="Pickings"
                >
                </button>
            </div>
            <xpath expr="//field[@name='invoice_line_ids']//tree" position="inside">
                <field name="move_line_ids" force_save="1" invisible="1" />
            </xpath>
            <xpath expr="//field[@name='line_ids']//tree" position="inside">
                <field name="move_line_ids" force_save="1" invisible="1" />
            </xpath>
        </field>
    </record>
</odoo>

Add move_line_ids to account.move view
[IMP] stock_picking_invoice_link: Add move_line_ids to account.move view

Adding this field at tree levels we are able to write from methods
and thus use the same technique that is used in this module from
other modules.
