diff options
| author | Xavier Morel <xmo@openerp.com> | 2014-01-23 08:57:42 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2014-01-23 08:57:42 +0100 |
| commit | d50f785b4fddf817a77a8fcd2c8e69262c0d5a9d (patch) | |
| tree | 274b4d2cdc3692bcc2df92be67211a0d2eea87ee /addons/analytic_user_function | |
| parent | 8d28d74dc9019b51df70214735b33223169d2b97 (diff) | |
[FIX] view requested by _view_ref with view_ref being undotted
Issue introduced in
revid:chm@openerp.com-20130828161130-641xsmbr8xm53xjx: context of a
fields_view_get can provide a *_view_ref name (e.g. tree_view_ref),
whose value is an xid for the view to use (can be used to specify a
view instead of providing a view_id, mostly for embedded views where
there is no way to provide a view_id).
The view_ref being an external id, it must be dotted. Historically,
undotted xids were silently ignored and the system just skipped to
getting the default view for the model (lowest priority view where
inherit_id is null).
In revid:odo@openerp.com-20130821122955-8c9z0mi8cu48rne3 this behavior
was altered to emit a warning when ignoring a malformed view_ref. When
this change was merged into trunk-website-al, the conditional
(view_ref and '.' in view_ref) was split without consideration for the
semantics change: a syntactically invalid view_ref would fall off the
first branch (view_ref) instead of taking the second one (not
view_ref), the code would not fetch the default view for the model and
would instead generate one (through _get_default_%(viewtype)s_view).
However, closer reading reveals the code was already broken in a
specific case of a syntactically valid but unknown xid (view_id
wouldn't get assigned in the first branch, but the code would not take
the second one, resulting yet again in a view generation even if the
database contains a valid view for the model and type).
Fixed by reintroducing explicit second check on view_id, instead of
merely conditional alternative.
bzr revid: xmo@openerp.com-20140123075742-603n2zthqhxee07y
Diffstat (limited to 'addons/analytic_user_function')
0 files changed, 0 insertions, 0 deletions
