[IMP] Add the corresponding content type document instead the default content type
Raise exception when ir_attachment creation fails
yaml: use selected user and not admin for onchange

Fixes: #1885
yaml: use selected user and not admin for defaults
Raise exception, don't reraise it

Allow the traceback to show real origin instead of this line by calling `raise` instead of `raise e`
When first generating user groups xml, user SUPERUSER's context
Prevent pgerrors from raising `UnicodeDecodeError`

Use `tools.ustr` for error conversion to prevent `UnicodeDecodeError` when
converting errors which can be unicode in depending on data.

Example:
```python
from openerp.osv.orm import convert_pgerror_23505
from psycopg2 import IntegrityError

e = IntegrityError(
    'duplicate key value violates unique constraint '
    '"hr_job_name_company_uniq"\nDETAIL:  '
    'Key (name, company_id)=(Directrice comptabilit\xc3\xa9, 1) '
    'already exists.\n'
)

convert_pgerror_23505(None, [], None, e)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 129: ordinal not in range(128)
```
Merge remote-tracking branch 'odoo/7.0' into 7.0
[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 remote-tracking branch 'odoo/7.0' into 7.0
Merge pull request #1886 from lepistone/7.0-fix-yaml-onchange-user

use selected user and not admin to run yaml tests
Merge pull request #108 from savoirfairelinux/fix_web_attchment

[7.0] Content-type value of response header is wrongly set for attachment downloads
Merge remote-tracking branch 'odoo/7.0' into 7.0
[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.
[FIX] l10n_ro: changed module author as requested in issue 621105
Merge pull request #112 from savoirfairelinux/7.0-pg_error-UnicodeDecode

[7.0] Prevent pgerrors from raising `UnicodeDecodeError`
Merge pull request #111 from savoirfairelinux/groups_context

[7.0] When first generating user groups xml, use SUPERUSER's context
Merge pull request #109 from savoirfairelinux/raise-exception-on-report-creation-failure

[7.0] Raise exception when ir_attachment creation fails
Merge remote-tracking branch 'odoo/7.0' into 7.0