Filter by Variant Attribute Value

When trying to filter Item’s from Stock, I’m trying to filter by “Attribute Value (Item Variant Attribute)”, but it fails miserably.

I tried for example In “x100,Impressão 1/0,Sem Cantos Arredondados,Sem Proteção”

And it shows me Items that do not have those. Example it will show also Item’s that have “x250” as Attribute Value.

I can’t also have more than one Equal in the Filter.

Am I doing something wrong? Am I supposed to use Not IN to filter what I want?

Thank you.

Using:
ERPNext: v15.19.2
Frappe Framework: v15.21.0

Worked, please check it.

I mean, when you want to Filter more than one attribute. Not just 1.

1 works correctly, when trying to filter with many it doesn’t work correctly.

the best I could achieve so far was to search for LIKE %Description

Worked, please check it.

The problem is the following example:

You want to find the only variants that include BLU and Large.

But because you placed BLU in the “In”, if “Small” Is also BLU, Variants with “Small” will also show up.

When the objective was to find only the variants with the specific BLU and Large.

Actually, I don’t understand your requirement. Can you explain it with a video?

Video at the moment I can’t sorry, but I’ll write a simple Example:

Let’s say the Item “T-Shirt”.

Attribute Values:

Material
-Cotton
-Polyester

Color
-Blue
-Red

Size
-Small
-Large

I want to filter ONLY all the Small Blue T-Shirts (Material can be All)

Desired Result:
T-Shirt-Cotton-Blue-Small
T-Shirt-Polyester-Blue-Small

If I set the Filter:
Item Variant Attribute “In” Blue, Small

Undesired Results (which Erpnext is currently doing):
T-Shirt-Cotton-Blue-Large ( didn’t ask for this! )
T-Shirt-Cotton-Blue-Small
T-Shirt-Polyester-Blue-Large ( didn’t ask for this! )
T-Shirt-Polyester-Blue-Small

( Because T-Shirt exists also in Blue and Large. )

On a final note:
I tried setting multiple “Equals”, “In”, etc and it doesn’t work. Only one works for Item Variant Attribute. It seems like this is not possible through this field.

So I managed to workaround by just:
Filter: Item-Name “Like” %Blue-Small

This appears to work correctly and show me desired the result:
T-Shirt-Cotton-Blue-Small
T-Shirt-Polyester-Blue-Small

But as I’m writing this, this can pose problems if an Item like
Polo Shirt-Polyester-Blue-Small exists and we don’t wish to see it in the filter.

Still have to make further tests to workaround this the best way possible.

I think I found the solution.

As the Attribute filters aren’t working properly, the best way I found to filter through Item’s with attributes is like the following example:

Item-Name “Like” T-Shirt%
Item-Name “Like” %Blue-Small

Depending on the objective, slight changes to the logic may happen.

As a final note, in fact I’m not using Item-Name but Description instead.