In draft invoices, the party field can be modified even if it has lines. However, in a purchase or sale, once it has lines, this field can no longer be modified.
What is the reason for the different behaviors?
If we have the account_invoice_line_standalone module activated and the invoice is created with lines already party, if you want to modify the header, the party cannot be changed because there is a party relationship between the invoice and the lines.
ok. In sales and purchase, there is a button “Modify Header”, and could change the header, and recompute some line values (price list, etc)
This module create lines. After, an user create the invoice and add lines.
In case now require change the invoice party , there is not “Modify header” to replace the header and recompute some lines values (in this case, the party).