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

Fixed following Errors:

1.ValueError: _prepare_analytic_line() takes exactly 2 argument...
2.Error when create new pos session.
3.attribute error on save of pos order.
4.invalid leaf error in asset categories form view.
5.invalid leaf error in partner form view.
6.invalid leaf error in sale_unit_test.xml.
7.period issue in sale_unit_test.xml.
8.invalid leaf error in write checks form view.
9.global name ids is not defined in product form view.
10.syntax error ) on click on My Follow-Ups menu.