|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|backport||[Openbravo ERP] A. Platform||major||always||2021-05-14 13:40||2021-05-18 13:57|
|Priority||immediate||Resolution||fixed||Fixed in Version||PR20Q4.4|
|Status||closed||Fix in branch||Fixed in SCM revision|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To|
|Regression level||Production - QA Approved|
|Regression introduced in release||PR21Q1|
|Regression introduced by commit||https://gitlab.com/openbravo/product/openbravo/-/commit/74ec2cdad81aba152fc7a704384cc96836dabde9 [^]|
|Triggers an Emergency Pack||No|
0046702: If a tab has a field for the id of the entity, it is no longer possible to create a new record in form view
|Description||For Application Dictionary generated windows, if a tab has a field for the id of the entity, it is no longer possible to create a new record in form view.|
An example of this can be found in the "Coupons on the Fly" module.
|Steps To Reproduce||- Log in https://livebuilds.openbravo.com/retail_modules_pgsql_pi/, [^] using "White valley group admin" role|
- Create a discount in "Discounts and promotion" window of type "Variable Amount Coupons". Make sure to check the flags "Uses coupon codes" and "Is OTF coupon"
- Go to "OTF Coupons generation rules".
- Create a new record in form view. Check the "Is variable coupon" flag. Fill all remaining mandatory fields (select the previously created discount as discount).
- Realise that you cannot save the record, because the following error is shown:
Saving failed. One or more fields contain illegal values, check the errors for each field.
If the definition of the window is changed, and the field for the id is removed, then the record can be saved correctly.
|Tags||No tags attached.|
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/367 [^]
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Author: Cristian Berner <firstname.lastname@example.org>
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/75dbb51faa05fb06429dfdf960d60405560c744d [^]
Fixes ISSUE-46702: Not possible to create a new record in form view if id is present in tab
This was due to how validation is handled in form, to avoid ISSUE-45301
a validateHiddenFields flag has been set to true to validate all hidden
fields that may be present in the form but under collapsed field groups.
This also checks all hidden fields, for example in this case identifier.
Which on new records is always undefined, until the record is saved and
an id is received.
To fix this, a check is done at validateField level, if the field is hidden and not displayed, validation will be skipped.
An alternative would be to only validate displayed fields at this level,
but this may be more prone to errors.
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/367 [^]
|2021-05-18 09:52||cberner||Type||defect => backport|
|2021-05-18 09:52||cberner||Target Version||=> PR20Q4.4|
|2021-05-18 10:00||hgbot||Note Added: 0128300|
|2021-05-18 13:57||hgbot||Resolution||open => fixed|
|2021-05-18 13:57||hgbot||Status||scheduled => closed|
|2021-05-18 13:57||hgbot||Fixed in Version||=> PR20Q4.4|
|2021-05-18 13:57||hgbot||Note Added: 0128324|
|2021-05-18 13:57||hgbot||Note Added: 0128325|
|Copyright © 2000 - 2009 MantisBT Group|