yaml: use selected user and not admin for onchange

Fixes: #1885
yaml: use selected user and not admin for defaults
[FIX] sql_db: close db connexions before removing them.

Closes #831 aka lp 1322191
[FIX] event onchange event type

Courtesy of Alejandro Santana

Closes: #1046, #1047
Merge pull request #1886 from lepistone/7.0-fix-yaml-onchange-user

use selected user and not admin to run yaml tests
[FIX] point_of_sale: pos details report company taxes and payments

If the sales details only fetches the pos sales details of his own company, it should be the case for the pos payments and taxes as well.
[MERGE] forward port of branch 7.0 up to e151e8f