Use SQL query to validate balanced move
For a migration I'm importing using proteus the account balances which is a move with about 20K lines. In proteus I create the lines per group of 1000 lines to optimize the cache usage. But this is still very slow. I think the main issue is the Move.validate_move which browses all the move lines to compute the balance. I think it will be better to perform this operation with SQL only. The same applies to the check in Move.post which check also that lines are balanced.