Convert NULL value for Char and Text to empty string
This is a recurring source of bugs that Char and Text values can be NULL
and ''
but they are indistinguable from the user interface.
For example the search on sale number in the client like Number: =
will give different result than Number: =""
depending of the number is NULL or empty string. But for the user they look the same.
So I think for the domain conversion we should consider both side of an operator on those fields as COALESCE(column, '') <operator> COALESCE(value, '')
.
Using a string as fallback will also solve issue like #13592 (closed).
At the ORM level, the read value will still be the value in the database so we could have None
or ''
.
And the required
attribute will still enforce NOT NULL
and not ''
.