Skip to Content
Menu
This question has been flagged
2818 Views

Hi,

I noticed some unexpected behavior in the onchange function when I append some leading or trailing spaces in a char field using Odoo 13.0.

To reproduce this issue:

- For any char field, create onchange function which simply applies strip() to the field in order to remove those white spaces.

I noticed that:

1- the onchange function will not be triggered if we only added some leading and/or trailing spaces to the original string.

2- if we removed those leading and trailing spaces using the onchange function (for example using .strip()), simply they will not be removed.

I know that I can remove them when I save the record, but I want the user to notice this change on-the-fly in addition to that this is a weird behavior.

I am not sure if this is a bug or not, or if it was already fixed in the latest updates.

Avatar
Discard
Related Posts Replies Views Activity
0
Nov 24
125
0
Oct 24
150
1
May 24
3173
1
Oct 23
363
2
Oct 23
672