~openerp-dev/openerp-web/7.0-bug-1097757-ggh

Viewing all changes in revision 3730.

  • Committer: Xavier Morel
  • Date: 2013-01-28 13:06:40 UTC
  • Revision ID: xmo@openerp.com-20130128130640-ksyvxvx6rlc4820n
[FIX] Inject user context in all domain and context evaluation

Custom keys from user context may be used in action contexts (not just
e.g. searchview filters). For instance, have a custom key
context_salesteam (in the user model) and an action defining some
search default as a function of the salesteam.

In that case, the action's context evaluation (view.js:~275) will blow
up.

Ensure that does not happen.

Note: eval_contexts already injects user_context in the reduction of
contexts to evaluate. It should be possible to alter the reduction
function to avoid having to inject instance.session.user_context
through pyeval.context(), maybe by _.extend-ing ``result_context``
into ``evaluation_context`` at the *top* of the reduction function
rather than at its bottom?

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: