Skip to content

Fixes ISSUE-47941: Validating error when creating a line

The problem was that sometimes, when creating a new record in grid mode, the new empty record was validated and that resulted in an error because some of the mandatory fields were still empty.

The validation should not have been triggered. It was triggered in this line [1], because it detected that the filter of a numeric filter was not undefined. It should have been undefined but instead it was null, because of this other line [2] that transformed an undefined value to a null value. This resulted in the filter assuming that the filter value had changed, and triggering the filter action as a result.

To fix this, the roundJsNumberUsingTypeInstance function now checks if the input value is undefined and returns immediately in that case.

[1] https://gitlab.com/openbravo/product/openbravo/-/blob/0cce31f23f48583342d7d830e40f8624ae174bcd/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js#L714 [2] https://gitlab.com/openbravo/product/openbravo/-/blob/0cce31f23f48583342d7d830e40f8624ae174bcd/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js#L484

Merge request reports