diff options
| author | Olivier Dony <odo@openerp.com> | 2015-02-25 17:46:38 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2015-02-26 14:03:05 +0100 |
| commit | bf31ab6718a8b9c8afdd29120e5056533b0a2ade (patch) | |
| tree | 4c719c72a2d0a7342d6fa3675edeadfffaa8fe3f /addons/web/static/src/xml/base.xml | |
| parent | e700805a43916cc9a90a6a287990e95060a9f84c (diff) | |
[FIX] product.template: name_search compatibility with product.product
In the rare places with a m2o field to product.template
(e.g BoMs), it is necessary to be able to search on product
codes, EAN, etc, the way it works on product.product.
This is done by delegating the name_search to product.product
and then returning the corresponding templates.
This has a small penalty of executing name_get() twice,
but is simpler and more robust for future changes.
An alternative would have been to extract the name_search()
method into a mixin and mix it on both product.product and
product.template. However this would be more brittle and
only work as long as the name_search implementation strictly
uses fields that are present in both tables.
OPW 626662
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
0 files changed, 0 insertions, 0 deletions
