yaml: use selected user and not admin for onchange

Fixes: #1885
yaml: use selected user and not admin for defaults
[FIX] account_analytic_analysis: tree fields access rights

Add invoicing related fields on anlytic account tree view for the invoicing group only
Otherwise, when a user not having the invoicing access rights displays the analytic account list, he gets an access right error.

opw-619485
Raise error on read of a browse object with bad id

Check if id is valid by searching record columns when a key error is raised
If the record has the column, the key error is actually an error on a
missing or inaccessible id.

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>

Closes #3658
[FIX] pad: etherpad limits pad id length to 50

See https://github.com/ether/etherpad-lite/issues/1116
[MERGE] forward port of branch 7.0 up to 284ca73
[FIX] web: ensure one2many field destruction on button cancel

The destruction of one2many fields is forced with the event change:effective_readonly
This revision add the forced destruction for cancel(discard) button as well

Otherwise, one2many fields are not properly destroyed when hitting the button "discard" (from save or discard).
This can be problematic for one2many editable list views (such as invoice lines) if you discard while having a mandatory field not filled in the invoice line: You can't recreate an invoice, the one2many editable list is messed up

Use case: Create an invoice, create a line, leave the description, required field, empty. Then, discard. Then, click on create.

opw-616946
[FIX] web: user lang has the priority on partner lang

Potentialy, the timezone too.

On item action click (such as menus in More.. and Print..), the data in form view had the priority on user context (through the sidebar_eval_context)

Therefore, if a field "lang" was present in the form view (like in partner form), the web/action/load xmlrpc call was using the partner language instead of the user language.

Example of wrong use case before the fix:
 - Set the user language in French, then go to a partner form of a partner with English set as language
  - Click on any button of the partner form, such as the "Invoices" button, notice that the last item of the breadcrumb is in English, instead of Frenh (the user language)
  - Click on any menu opening a wizard in the More.. dropdown menu, notice that the wizard title is in English instead of French
  - Print any report from the Print dropdown menu, notice that the report file name is in English. If you print the same report for the same partner but from the list view, the report file name is in French.
[FIX] email_template: default model for save as new template feature

When sending a message with the "Compose new message" button on the right of the user menu, in the top bar, if you tried to save the message as template, you had a traceback because model field of email.template is mandatory, but was set to True because there is no model in such a case.

As there is no any relevant model in such a place, and that the field is mandatory, mail.message is pretty convenient as the default value.
[FIX] email_template: missing translations in email template

When composing an email based on an email template, some parts of the template
(the result of name_get on fields) were not translated.
This was due to missing language in context when rendering the template.
Fixes #3708, opw 617309
[FIX] account_aged_partner_balance: accurate total

In some cases when the move was partially reconciled, the amount of the move wasn't added to the total
This is related to rev. abe5c803a0e36f18aec4cc56abc289f66329a749
[MERGE] forward port of branch 7.0 up to db98434
[FIX] purchase: cancel PO lines and set related procurements in exception on cancelation of a PO
[FIX] base: Malaysian currency

Default Currency for Malaysia is MYR (Malaysian ringgit), not MXN (Mexican peso)
Fixes #4193
[FIX] sale_margin: margin handle included taxes for sale

Another fix should probably be build for purchase price, but it isn't that easy, we need to know the partner to which the product has been purchased, as taxes are partner/country dependent.

Besides, included taxes in purchase prices happen less often.
[MERGE] forward port of branch 7.0 up to f46fa1d
[FIX] account: accurate amount total due with partial reconcile

This is related to rev. db98434e85be8ae0dfdb580a263704e3bac454e2

rev. abe5c803a0e36f18aec4cc56abc289f66329a749 forgot some partial reconciliations when the date domain was other than BETWEEN (for instance, <= stop date or >= start date, alone, not between)
Besides, the rev. abe5c803a0e36f18aec4cc56abc289f66329a749 did not care about account move being posted or not.

rev. db98434e85be8ae0dfdb580a263704e3bac454e2 took several times the same partially reconciled moves lines
[MERGE] forward port of branch 7.0 up to 5aa128c
[FIX] mail: access link generaTION

Catch only the error related to the access of the linked record.
Previous was hidding error to access the ir.config_parameter and eventual other
errors from the orm.
Uses SUPERUSER_ID to access instance URL (e.g. portal has no access to it).
Fixes #4234 #4234
[FIX]web_gantt: value rendering with decimal separator other than dot