Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • openbravo openbravo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 38
    • Merge requests 38
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Commits
Collapse sidebar

Scheduled maintenance on the database layer will take place on 2022-07-02. We expect GitLab.com to be unavailable for up to 2 hours starting from 06:00 UTC. Kindly follow our status page for updates and read more in our blog post.

  • openbravo
  • product
  • openbravoopenbravo
  • Merge requests
  • !512

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

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Augusto Mauch requested to merge openbravo/devel/openbravo:fix/48341-disappearing-edit-button into master Jan 25, 2022
  • Overview 1
  • Commits 1
  • Changes 1

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

Edited Jan 25, 2022 by Augusto Mauch
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix/48341-disappearing-edit-button