Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 140
    • Merge requests 140
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !1975

Open
Created Jul 04, 2024 by Titouan Soulard@tsoulardDeveloper
  • Report abuse
Report abuse

WIP: ODS-style exports do not work with “Hide Listbox Rows (if no Search Criterion)”

  • Overview 5
  • Commits 2
  • Pipelines 1
  • Changes 2

Description of the problem

On Nexedi ERP5, we recently ran into an issue: when trying to export Support Requests (using the « Export as Spreadsheet » action), the exported document was empty when using the RenderJS interface. On XHTML style interface, however, the document would not be empty if at least one search criterion was selected. I’ll therefore further describe the problem as two separate issues:

  1. even with a search criterion given on the RenderJS interface, nothing shows up;
  2. without a search criterion, nothing shows up at all.

Please let me remind first that we use on Nexedi ERP5 the “Hide Listbox Rows (if no Search Criterion)” system preference, which does exactly what it says: it does not show anything in listboxes when no search criterion is given.

Nothing shows on RenderJS

Contrary to the XHTML interface, RenderJS only uses full-text search. However, the method isHideRowsOnNoSearchCriterion which tries to determine if rows should be shown, does not seem to account for it, instead iterating over the separate search fields. The second commit of this MR suggests a fix to solve it, by simply showing rows when a full-text search is made.

Nothing shows up without a search criterion

Even with the aforementioned commit, nothing would show up in exports, regardless of the interface used (RenderJS or XHTML). This behaviour is linked to the same option: the export is simply a custom ODS skin showing the content of the listboxes, which do not contain any content without a search criterion. Fortunately, an option exists to force displaying all rows: ignore_hide_rows, and my first commit adds it to the ODS macro to restore functioning exports (this is what has been done on production for now).

I am still unsure if any of these two fixes is the right way to go, or if there is another way, that is why I am opening this MR for comments!

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: for-mr-caterpillar
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7