Inventory API: reimplement variation_category
In its current implementation ( introduced in 4787eadd ), variation_category
parameter of Inventory API require movements to be in the predicate_category
table. The approach is to do a first query to get uids of all movements members of the variation and pass their uid
to catalog. My guess is that this does not scale well. It also uses deprecated where_expression
and generates invalid SQL when no movements match.
As far as I know, it is only used in testInventory. We could also consider dropping it, but keeping compatibility is easy.
This implementation just use variation_text
.
Test results are OK; there is one functional test failure but it really looks unrelated.
@yusei @vpelletier @seb @romain do you see problems with this ?