Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2021-06-30 22:192021-07-12 08:23
ReporterlbressanView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionPR21Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0047309: Creation of invoices from the grid, loss of Focus

DescriptionThe error was detected because several clients reported the error to the partner after updating the Openbravo.
When creating an invoice and its lines from the Grid view, you are losing focus, so after creating an invoice you must exit and refresh the window.

This is playable in livebuild 21Q2

NOTE: Indicate that this problem also occurs when you create a new table or window, it has happened to us more than once to be creating a new field thinking that we have the focus on the correct window and then not finding the field because it has been saved in another window.
That is, it does not seem to be only exclusive to the invoice window, but it extends to all windows.
Steps To Reproduce1. Open Purchase Invoice window (if already open, close it and open it again)
2. Create a new invoice in form mode and save
3. Create a new line in lines tab in grid mode
(Line is created without allowing editing it, actually it is saved automatically with the default data, which is wrong)
This is more visible if reproduced using Sales Order, repeat the steps with sales order, the line in lines will appear red with an error.

Previous Steps:
- Open customer invoice window and create an invoice
- Create lines in grid mode
- Open purchase invoice window
- Remove message in blue and clean filters
- Create header in form
- Create grid lines
TagsNo tags attached.
Attached Filesjpg file icon IMG-01.JPG [^] (159,996 bytes) 2021-06-30 22:19

png file icon SalesInvoiceError.png [^] (87,907 bytes) 2021-07-01 11:01

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0047581 closedplatform The Add Details button on Payment In/Out window is missing after sorting records 
related to defect 0047571 feedbackSergio_Gomez Sales Order Line is not rendered after clearing the filter and creating a Sale Order 

-  Notes
lorenzofidalgo (developer)
2021-07-01 11:00
edited on: 2021-07-01 11:00

I have been able to reproduce it in [^] following these steps:

1-Login as Openbravo in [^]
2-Go to Sales Invoice window
3-Click in "Create new record in a form" button and fill "Business Partner" with "Restaurantes Luna Llena, S.A."
4-Click Lines tab
5-Click "Create One" to add a new grid row
6-Click the Arrow selector of Product field and add "Bebida Energ├ętica 0,5L"
7-Click grid save button
(I attach image with the error)

hgbot (developer)
2021-07-09 10:22

Merge Request created: [^]
hgbot (developer)
2021-07-12 08:23

Merge request merged: [^]
hgbot (developer)
2021-07-12 08:23

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: b3cc188d9a7a312d83ae5f0ef831e41dd8c94f7d
Author: Augusto Mauch <>
Date: 2021-07-09T13:29:10+02:00
URL: [^]

Fixes ISSUE-47309: Saving record from form view sometimes fails if grid does not have all data in cache

The problem was the following:
- Start with a grid where not all data is cached (i.e. Sales Order after cleaning the filter)
- Use a grid sort so that the new record would end up after the last one shown in the grid (i.e. documentno asc)
- Add a record in form view. The record is initially added to the grid in the first row, but the filter is applied right after
- Because the new record would not be in the first page, the grid would move the viewport to display it and do datasource requests to obtain the proper page
- These unexpected datasource requests result in grid selections not storing the new data properly

To fix this we follow a similar approach to what is done when adding a new row to the grid while not having all the data cached [1]. The new row is stored in the first
position, regardless of the filter. Now when storing a new record in form view, the grid filter is removed if not all the data is cached, and as a result the new record
will be stored in the first position, and the grid selection will work as expected.

[1] [^]

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

- Issue History
Date Modified Username Field Change
2021-06-30 22:19 lbressan New Issue
2021-06-30 22:19 lbressan Assigned To => Triage Finance
2021-06-30 22:19 lbressan File Added: IMG-01.JPG
2021-06-30 22:19 lbressan Modules => Core
2021-06-30 22:19 lbressan Resolution time => 1627423200
2021-06-30 22:19 lbressan Triggers an Emergency Pack => No
2021-07-01 07:56 Practics Issue Monitored: Practics
2021-07-01 09:23 vmromanos Assigned To Triage Finance => platform
2021-07-01 10:05 cberner Steps to Reproduce Updated View Revisions
2021-07-01 10:30 cberner Steps to Reproduce Updated View Revisions
2021-07-01 11:00 lorenzofidalgo Note Added: 0130051
2021-07-01 11:00 lorenzofidalgo Note Edited: 0130051 View Revisions
2021-07-01 11:01 lorenzofidalgo File Added: SalesInvoiceError.png
2021-07-01 23:56 lbressan Description Updated View Revisions
2021-07-08 19:31 AugustoMauch Assigned To platform => AugustoMauch
2021-07-08 19:31 AugustoMauch Status new => scheduled
2021-07-09 10:22 hgbot Note Added: 0130345
2021-07-12 08:23 hgbot Note Added: 0130363
2021-07-12 08:23 hgbot Resolution open => fixed
2021-07-12 08:23 hgbot Status scheduled => closed
2021-07-12 08:23 hgbot Fixed in Version => PR21Q4
2021-07-12 08:23 hgbot Note Added: 0130364
2021-09-06 07:53 alostale Relationship added has duplicate 0047581
2021-10-27 13:24 AugustoMauch Relationship added related to 0047571

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker