summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2016-03-24 15:16:49 +0100
committerThibault Delavallée <tde@openerp.com>2016-04-21 14:12:39 +0200
commit8ddb6c23a9b0bc7655f2694f1e30bb15a719bff1 (patch)
tree43a73170eb67b882bb8f9a8323b1bba7b06d312c /addons/web/static/src/xml/base.xml
parent313a461eaa3b06ef28d2126b0d51762f937c0507 (diff)
[FIX][IMP] stock: product: product_available
When computing the domain to find the product available data, a special case is currently managed when doing a child_of in locations. Indeed computing product available data requires to check its related quants. It is possible through the context to limitate the search to a given set of locations. The location_id field on stock_quant model is set as auto_join. However the use of auto_join with the child_of operator is currently not supported by the ORM. Those parts are converted into (id, in, ids) equivalent domain leaf that can be costly due to quants table being quite large. The existing code in product.py therefore tries to manually optimize the quant computation by computing manually domain with child_of, using parent_left and parent_right. However there are some cases when parent_left and parent_right can be 0 notably in update mode. However the current code does not correctly take into account some location not having parent left / right and other having a parent left / right being still 0 because still not computed. This commit fixes that, allowing the correct computation of available product data in update mode. This limitation has been spotted when migrating stock to the new API. Indeed unit tests have been added. In those tests product available info was not correctly computed. Those tests will come when merging the new API version of stock.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
0 files changed, 0 insertions, 0 deletions