Let's try to clarify the discussion a bit. As Xavier mentioned on the merge proposal[1], Many2One search fields have always resolved `self` to a string value when it is used in a @filter_domain or @context attribute. This is necessary to keep a consistent API for partial matches, for example when self is "Sto" to match "Stock". The reason why this bug occurs is not because of a change in Many2One fields, but simply because there used to be a widget="selection" attribute on some of the magic search fields where `self` is used, switching them to Selection fields instead. Selection search field *do resolve to IDs* because of their key-value nature.
Looking at the history, these widget="selection" attributes were dropped by mistake during a global cleanup of all search views in preparation of v7. In general there was no reason to keep a widget="selection" in a search view because of the unified search widget of v7 - the selection would never be visible in any case. However when `self` was being used for magical fields, this had the unfortunate side-effect of changing the type of `self`. The revision were the cleanup occurred is [2], and a quick scan of the patch only reveals a few occurrences of this error: 6 in account/account_voucher, 1 in product, and 2 in stock. The easiest fix is to re-add the missing widget="selection" attribute for these special cases. This has already been fixed for account before the 7.0 release [3], and the product case was fixed in the mean time too, by actually allowing string values for the `pricelist` context. The rest of the cases were fixed by restoring the widget="selection" attribute, just merged at revision [4]. Thanks for reporting and for your patience! [1] https://code.launchpad.net/~openerp-dev/openerp-web/7.0-opw-585134-msh/+merge/146344 [2] addons 7.0 revno 7142 revid:[email protected] [3] addons 7.0 revno 7895 revid:[email protected] [4] addons 7.0 revno 9500 revid:[email protected] ** Changed in: openobject-addons Importance: Undecided => Low ** Changed in: openobject-addons Status: Fix Committed => Fix Released ** Changed in: openobject-addons Milestone: None => 7.0 -- You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Addons. https://bugs.launchpad.net/bugs/1192484 Title: [stock][7.0]wrong search by context Status in OpenERP Addons (modules): Fix Released Bug description: 1.-Steps to reproduce the issue you have observed go to Warehouse / Products search "stock" and choose one location 2.- The result you observed When choose location shows Error 3.-The result you expected shows no errors 4.- runbot (Build 13901) Note: I uploaded a video http://youtu.be/rglT48auAWA To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-addons/+bug/1192484/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~openerp-india Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-india More help : https://help.launchpad.net/ListHelp

