~nicolas-tresegnie/openerp-web/bug-fix-1002897

Viewing all changes in revision 2327.

  • Committer: Xavier Morel
  • Date: 2012-05-16 15:33:09 UTC
  • mfrom: (2311.1.1 web-6.1)
  • Revision ID: xmo@openerp.com-20120516153309-3eq957p1pbj99fun
[FIX] context and domain of an action being added to a dashboard

* The action's context and domain are needed because they are
  explicitly ignored by those codepaths when the action is ultimately
  executed in the dashboard, and their data are needed: such flags as
  group_by_no_leaf may be set in the action's context, or things like
  the leads/opportunities filters which need to remain in the
  dashboard view.

* On the other hand, some keys in the action's context may be
  detrimental to the correct behavior of the action in the dashboard,
  one such key (group) is the search_default_*: these default values
  for the search view may have been unset by the user before adding to
  the dashboard, we must not add them back. And since the dashboard
  will instantiate a full action/view manager for each action there
  will be (empty) search views which will try to make use of those
  defaults.

As a result, add the action's context and domain to those of the
research while *creating* the dashboard action/section, *but* filter
out search_default_* context keys while doing so.

If new problematic context keys are discovered, they should be added
to the filter.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: