Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0048341Openbravo ERP07. Sales managementpublic2021-12-30 12:572022-01-26 07:30
idiez 
AugustoMauch 
highmajoralways
closedfixed 
5
3.0PR19Q4.4 
PR22Q2 
Core
2022-01-10
No
0048341: Edit buttons on sales order lines disappear after editing
Edit buttons on sales order lines disappear after editing in the version 19Q4 and 21Q4
1) Go to the "Sales order" window
2) Clear the filter
3) Add the column "Order Reference" in grid view
4) Edit the first record in grid view, enter a value in the Order Reference view and click on the next record. Note that the Edit/Create buttons on the left side of the row that was just edited have dissappeared

Note that if instead of clicking on the next record we use the ARROW DOWN key as a shortcut, the issue is not reproduced
No tags attached.
? bug19.4.mp4 (4,640,713) 2021-12-30 12:57
https://issues.openbravo.com/file_download.php?file_id=16481&type=bug
Issue History
2021-12-30 12:57idiezNew Issue
2021-12-30 12:57idiezAssigned To => Triage Finance
2021-12-30 12:57idiezFile Added: bug19.4.mp4
2021-12-30 12:57idiezModules => Core
2021-12-30 12:57idiezRegression date => 2022-01-10
2021-12-30 12:57idiezTriggers an Emergency Pack => No
2021-12-31 09:14vmromanosAssigned ToTriage Finance => platform
2021-12-31 09:16vmromanosNote Added: 0134082
2022-01-03 10:40AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23478#r23478
2022-01-03 11:07AugustoMauchAssigned Toplatform => AugustoMauch
2022-01-03 11:08AugustoMauchStatusnew => scheduled
2022-01-25 09:50hgbotNote Added: 0134543
2022-01-26 07:30hgbotResolutionopen => fixed
2022-01-26 07:30hgbotStatusscheduled => closed
2022-01-26 07:30hgbotNote Added: 0134563
2022-01-26 07:30hgbotFixed in Version => PR22Q2
2022-01-26 07:30hgbotNote Added: 0134564

Notes
(0134082)
vmromanos   
2021-12-31 09:16   
Hi Platform,

I'm able to reproduce it in livebuilds PI. It seems a problem in the grid's autosave when editing a field and moving to another record.
(0134543)
hgbot   
2022-01-25 09:50   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/512 [^]
(0134563)
hgbot   
2022-01-26 07:30   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/512 [^]
(0134564)
hgbot   
2022-01-26 07:30   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 45dda6f14808c5ec84f2b4efd24eec21b1318c71
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 26-01-2022 06:30:12
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/45dda6f14808c5ec84f2b4efd24eec21b1318c71 [^]

Fixes ISSUE-48341: Grid edit buttons disappear in some windows

The problem was only reproducible in grids where canvas field columns were displayed (i.e. Sales Order displays two by default, Delivery Status and Invoice Status). Those
fields are managed by Smartclient as embeddedComponents and the area that contains the two buttons that disappear (OBGridButtonsComponent) is an embeddedComponent too.
Whenever the user moves to a different row those components are recreated/recomputed (grid buttons here [1], canvas fields here [2]). Canvas fields are recomputed maintaining
the row number they belong too, while grid buttons are recreated without a record number and rely on this smartclient function [3] to be assigned one. For that function to be
executed, the first of the embedded components must have a null row number, so if there is a canvas field that happens to be the first component in the embeddedComponents array,
the grid buttons component will not be assigned a row and thus will not be displayed.

Programatically assigning a row number on [1] when recomputing the grid buttons component does not work because [3] needs to be invoked (it sets a smartclient property that is
not visible), so to fix the problem I am ensuring that when canvas fields are recomputed in [2], its row number is unset

[1] https://gitlab.com/openbravo/product/openbravo/-/blob/20904b11ad82f3cb37e2e3bce67127dedbf8d477/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js\#L4963 [^]
[2] https://gitlab.com/openbravo/product/openbravo/-/blob/20904b11ad82f3cb37e2e3bce67127dedbf8d477/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js\#L434 [^]
[3] https://gitlab.com/openbravo/tools/platform/org.openbravo.userinterface.smartclient.dev/-/blob/6b4f3f70cc3241de7eae4eba2f5e918586844729/web/org.openbravo.userinterface.smartclient/isomorphic/client/widgets/GridRenderer.js\#L2599 [^]

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