[IMP] Add the constraints :
Remove the possibility to modify or delete a move line related to an
invoice or a bank statement, no matter what the status of the move
(draft, validated or posted). This is usefule in standard context but
moreover if you're using : account_default_draft_move. This way you ensure
user cannot make mistake even in draft, he must pass through the
parent object to make his modification.

[MERGE] Methods for storing correctly the value amount_to_pay, that in 6.1 is stored, but not recomputed whenever its conditions changes, and for 7.0 is directly not stored, impacting on the performance on some operations.