[FIX]Fixed some traceback and error in accounting new api.

Fixed following issues:
Fixed the issue of You cannot validate a non-balanced entry.
Fixed Todo:seted invoice id in account.move.line on validate of invocie.
Fixed ValueError: period_10 not found in membership module.
Fixed error for model_edi_edi.
Fixed singleton error on onchange of partner in invoice.
Fixed invalid leaf error for type field in expense form view.