Skip to content

Filter on Product list - Don't work if unit column is active #32911

Open
@Antoine-514

Description

Bug

Hello,

If the key PRODUCT_USE_UNITS is active (value 1), and this column is added on the product screen list.
The filters (all column except unit) on product screen didn't work.

On the first opening, the list is displayed.
But if you add a criteria : the list become empty.

Dolibarr Version

20.0.3

Environment PHP

8.3.15

Environment Database

MySQL or MariaDB 10.6.20-MariaDB-cll-lve

Steps to reproduce the behavior and expected behavior

Active the unit for product
PRODUCT_USE_UNITS = 1

Add column unit on product screen

Add (of course) some unit on products.

Try to make a filter on every column (except unit), the return is an empty list.

I notice the first value of the unit list is "blank"/"empty".
And I think the system use this value as filter.
Not on the first opening but on the first filter criteria.

As example, do the same test with the column "nature of product". (And remove "unit" column)
The first value of the list is also "blank"/"empty", but it doesn't break the filter.

Tested on Chrome and Safari, on MacOS

Attached files

No response

Metadata

Assignees

Labels

BugThis is a bug (something does not work as expected)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions