[FIX] account_voucher, product, stock: use selection widgets for magic context fields...
authorOlivier Dony <odo@openerp.com>
Fri, 4 Oct 2013 10:52:18 +0000 (12:52 +0200)
committerOlivier Dony <odo@openerp.com>
Fri, 4 Oct 2013 10:52:18 +0000 (12:52 +0200)
commitbec80227d981f9da26dd3e6bb58b15c31893045c
treea618a17c47d65abc8331aab3adb02d79e891cda9
parent6ad09a8b409ce9942bd658eef534f3e3754219a6
[FIX] account_voucher, product, stock: use selection widgets for magic context fields, to pass IDs in the context instead of strings

Many2one fields resolve to strings when used
as `self` within the @context or @filter_domain
attributes of a search field, because they
must be able to support partial matches,
e.g. search for "Sto" to match "Stock".
In many case the code was not prepared to accept
string for the magic context values, so the
magic fields now caused crashes.

The widget="selection" attribute was dropped
during the search view cleanup for 7.0,
without noticing this unfortunate side-effect,
at revision:
  addons 7.0 revno 7142 revid:qdp-launchpad@openerp.com-20120731150358-jqd3eoz06imzlx01

lp bug: https://launchpad.net/bugs/1192484 fixed

bzr revid: odo@openerp.com-20131004105218-edvb5ewduqar3x88
addons/account_voucher/account_voucher_view.xml
addons/account_voucher/voucher_payment_receipt_view.xml
addons/account_voucher/voucher_sales_purchase_view.xml
addons/product/product_view.xml
addons/stock/product_view.xml
addons/stock/stock.py