Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0047799 | Openbravo ERP | A. Platform | public | 2021-10-01 17:52 | 2022-02-01 07:24 | ||||||||||||||
Reporter | vmromanos | ||||||||||||||||||
Assigned To | Triage Platform Base | ||||||||||||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||||||||||||
Status | new | Resolution | open | ||||||||||||||||
Platform | OS | 5 | OS Version | ||||||||||||||||
Product Version | |||||||||||||||||||
Target Version | Fixed in Version | ||||||||||||||||||
Merge Request Status | |||||||||||||||||||
Review Assigned To | |||||||||||||||||||
OBNetwork customer | |||||||||||||||||||
Web browser | |||||||||||||||||||
Modules | Core | ||||||||||||||||||
Support ticket | |||||||||||||||||||
Regression level | |||||||||||||||||||
Regression date | |||||||||||||||||||
Regression introduced in release | |||||||||||||||||||
Regression introduced by commit | |||||||||||||||||||
Triggers an Emergency Pack | No | ||||||||||||||||||
Summary | 0047799: Tab --> Add Function different problems with the new record created | ||||||||||||||||||
Description | Discovered in the Modify Payment Plan feature. There is an Add Function defined into the tab (OB.APRM.addNew). There is a Validation Function defined into one of the fields (Outstanding --> OB.APRM.validateModifyPaymentPlanAmounts) The implementation uses: returnObject = isc.addProperties({}, allRows[0]); to clone an existing record from the grid to use it as a template. Some properties are modified and then it is returned by the function. The record is added to the grid after executing the function, however the following problems have been detected: 1) The validation function associated to the field is not executed after returning the record. This behavior is not consistent if we compare with the Remove Function which is executed (see 0047798) 2) The fields associated to a foreign key (Payment Method in my case) are not properly populated in the new record. Not sure if this is related to the function used to clone the record or anything else. In any case, it should be provided an API to be able to clone a record ready to be added to the grid. 3) If I manually edit the field associated to the validation function just after creating the new record, the validation function's item.grid.data.allRows doesn't have yet the newly created record. However, in the moment I press over the same field in another record, the validation function is called again, but this time the item.grid.data.allRows does have the record. This behavior makes it very difficult to implement a consistent validation function. 4) The item.grid.data.allRows doesn't have updated information. | ||||||||||||||||||
Steps To Reproduce | As System Admin. Go to Window, Tabs and Fields. Search for Sales Invoice window. Select Payment Plan tab. Search for the Modify Payment Plan field which is hidden. Set Displayed = Y Change role to F&B group admin Go to Payment Term window. Create a header for * org - Overdue Payment Days Rule : 100 Create the following lines: - Percentage due: 25, Overdue Payment Days Rule: 10 - Percentage due: 35, Overdue Payment Days Rule: 15 - Percentage due: 20, Overdue Payment Days Rule: 90 Go to Sales Invoice window and create a new record for Norte organization. Select the above payment term in the header and use "Transferencia" payment method. Enter any line with some amount. Complete the invoice. Go to Payment Plan tab and select any record. Press Modify Payment Plan button. A grid is opened with several lines. Set a break point over the OB.APRM.validateModifyPaymentPlanAmounts function Delete any of the lines. Create a new line. Verify that: - The validation function is not executed [point (1) above] - The Payment method is not "Transferencia" but "Al Contado" (the first item in alphabetic order). It should be set to Transferencia as I'm cloning from a record with Transferencia payment method [point (2) above] Now edit the Outstanding amount and set something lower. Press in an empty space of the grid. The validation function is run, but the item.grid.data.allRows has 3 records when it should have 4 [point (3) above] Now select the Outstanding amount of any other record. The validation function is run, but the item.grid.data.allRows has now 4 records. This is OK, but is not consistent with previous scenario [point (3) above]. Cancel the popup. Press again Modify Payment Plan button. Delete any of the lines. Create a new line and change the outstanding amount to a lower value. Now enter a new line. The validation function's item.grid.data.allRows has the original outstanding amount and not the new lower amount. This means you can't trust in the information that you receive in the function. [point (4) above] | ||||||||||||||||||
Proposed Solution | 1) Validation function should be run after creating the new record 2) Validation function should always receive in item.grid.data.allRows all the available rows (old and the newly created) 3) The clone feature should be able to work with FK fields 4) The information that you receive in the validation and new functions must be updated | ||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | |||||||||||||||||||
Issue History | |||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||
2021-10-01 17:52 | vmromanos | New Issue | |||||||||||||||||
2021-10-01 17:52 | vmromanos | Assigned To | => platform | ||||||||||||||||
2021-10-01 17:52 | vmromanos | Modules | => Core | ||||||||||||||||
2021-10-01 17:52 | vmromanos | Triggers an Emergency Pack | => No | ||||||||||||||||
2021-10-01 17:52 | vmromanos | Issue generated from | 0047798 | ||||||||||||||||
2021-10-01 17:52 | vmromanos | Relationship added | related to 0047798 | ||||||||||||||||
2021-10-01 18:05 | vmromanos | Description Updated | bug_revision_view_page.php?rev_id=23131#r23131 | ||||||||||||||||
2021-10-01 18:05 | vmromanos | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=23133#r23133 | ||||||||||||||||
2021-10-01 18:05 | vmromanos | Proposed Solution updated | |||||||||||||||||
2021-10-01 18:20 | vmromanos | Relationship added | blocks 0047707 | ||||||||||||||||
2022-02-01 07:24 | alostale | Assigned To | platform => Triage Platform Base |
There are no notes attached to this issue. |