yaml: use selected user and not admin for onchange

Fixes: #1885
yaml: use selected user and not admin for defaults
[FIX] stock: compute average price on action_done

The average price computation is now deduplicated and moved to
a separate function called in stock_move action_done.
This makes sure it is always called when a stock.move is
processed, even without going through the partial picking wizard.

Fixes #2991
Closes #3949
OPW-615491
[ADD] purchase: average price computation test
[IMP] mrp: add prepare method for manufacturing orders to allow override

Fixes #3973
[IMP] web: do not fully hide pager in grouped view

When the list view is grouped, the page count should be hidden as irrelevant.
However if it's fully hidden, the limit can no longer be changed.
Instead of hidding the pager, this commit hides the arrows and replaces
the content by the current limit to allow to be changed.
[FIX] product: add store=dict to field name_template

Recompute the name_template field if the template changes.

backport of 41628fc + f25c5d8 to 7.0 plus some optimisations in triggers
Fixes #3277
[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
[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: 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
[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.
[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
[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