Suppose we have a custom field free_quantityty in the invoice line. But when we save the invoice the value is disappeared. The reason is that there are two One2Many fields in this model (account.move). The solution is we have to add this field in both of one2many fields which are invoice_line_ids and line_ids.
Here is an example below:
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='price_unit']" position="after">
<xpath expr="//field[@name='line_ids']/tree/field[@name='account_id']" position="after">
<field name="free_quantity" invisible="1"/>
I Hope, it will help. Thanks