[FIX] enable --debug for non-xmlrpc contexts

fixes #3102
[IMP] account: account.statement.operation.template model
- better many2one ondelete strategies
- domain set on fields, not views
- added domain on analytic_account_id field