Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045332Openbravo ERP07. Sales managementpublic2020-10-26 15:472020-10-30 12:36
ngarcia 
cberner 
urgentmajoralways
closedfixed 
5
 
PR20Q3.2PR20Q3.2 
AugustoMauch
Core
Production - Confirmed Stable
2019-08-30
3.0PR19Q3
No
0045332: Sales Order header can be saved without Invoice Address although it is mandatory
Sales Order header can be saved without Invoice Address although it is mandatory.

Business Partner window also has a mandatory field in a "More Information" field group, it can be saved if empty and More Information is collapsed.
As group admin role:
   Create a customer
   Add a location to it
   Set it as Invoicing Address = 'N'

Create a Sales Order header
Do not expand the More Information section
Set the required fields (except Invoice Address)
Click on Lines tab and check the header is saved and it shouldn't
Open the More Information section
Click on Lines tab
Check the following error is shown:
   One or more fields contain illegal values, check the errors for each field.
This is correct

It is also reproducible in Business Partner window
- Create a new BP
- Open More Information collapsed field group
- Empty "Credit Line Limit" field
- Close More Information field group(collapse it)
- Click on the Customer subtab
- Check that the BP was saved, although the "Credit Line Limit" has invalid information.
Validate also hidden fields.
No tags attached.
has duplicate defect 0048029 closed vmromanos Invoice address is not getting validated 
blocks defect 0045301 closed cberner Sales Order header can be saved without Invoice Address although it is mandatory 
Issue History
2020-10-29 10:56cbernerTypedefect => backport
2020-10-29 10:56cbernerTarget Version => PR20Q3.2
2020-10-29 11:00hgbotNote Added: 0123997
2020-10-30 12:36hgbotResolutionopen => fixed
2020-10-30 12:36hgbotStatusscheduled => closed
2020-10-30 12:36hgbotNote Added: 0124061
2020-10-30 12:36hgbotFixed in Version => PR20Q3.2
2020-10-30 12:36hgbotNote Added: 0124062
2021-11-11 16:05vmromanosRelationship addedhas duplicate 0048029

Notes
(0123997)
hgbot   
2020-10-29 11:00   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/208 [^]
(0124061)
hgbot   
2020-10-30 12:36   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/208 [^]
(0124062)
hgbot   
2020-10-30 12:36   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 71477140859701da7bbaf84a8491dd3dcff7349d
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-10-29T10:59:12+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/71477140859701da7bbaf84a8491dd3dcff7349d [^]

Fixes ISSUE-45332: Record can be saved with missing mandatory field data

If a mandatory field in a collapsed field group had no value or invalid
values, the record could be saved by the auto-save when changing focus
to a child tab.

The approach taken here is to also validate hiddenFields that are not
present because of being in a collapsed field group.

form.validate method can be found in smartclient DynamicForm and it
accepts as first argument a boolean indicating to validate or no hidden
fields, it is now set to true on ob-view-form, fixing this issue.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---