Augusto Mauch <augusto.mauch@openbravo.com> [Wed, 07 Jan 2015 16:02:36 +0100] rev 25677
Fixes issue
28537: Grid is loaded properly after scrolling it and sorting it
In this changeset [1] a change was done to prevent modifying improperly the totalRows property of the grid after scrolling. This code was meant to be executed after scrolling the grid, and to check it the lastScrollTop property and the getScrollTop() function of the grid body were compared. This check works properly when event that triggered the datasource request was the grid being filtered or a new page being fetched due to scrolling the grid.
The problem was that the check did not work properly when the datasource request was triggered due to having sorted the grid. In this case, the totalRows property should be left as is. To fix this, a new flag is used to control when the datasource request has been triggered by a sorting event.
[1] https://code.openbravo.com/erp/devel/pi/rev/c51dce7e9fd3
Augusto Mauch <augusto.mauch@openbravo.com> [Wed, 07 Jan 2015 12:42:34 +0100] rev 25676
Fixes issue
28505: Document number field length is not always hardcoded to 20
In this changeset [1], that was included in the first release of Openbravo 3.0, the length of the document number field length for the grids is hardcoded to 20. The length of the form field is taken from the length of the column in the application dictionary.
Having a different length in the grid and form fields resulted in the value of the field being truncated when it is edited in the view with the shortest length. It is not possible to remove the hardcoded code because it is possible that some Openbravo instances depend on it (i.e. if the length of the document number column is set to 0). In order to fix this issue, now the hardcoded code only affects the fields whose length is 0. For all the other cases, the length of the grid field will be taken from the length of the column.
[1] https://code.openbravo.com/erp/devel/pi/rev/ae5c327c567f#l3.14
Augusto Mauch <augusto.mauch@openbravo.com> [Wed, 07 Jan 2015 10:18:24 +0100] rev 25675
Fixes bug
28519:OrganizationStructureProvider.initialize should be synchronized
The method OrganizationStructureProvider.initialize should be synchronized, because otherwise it could be executed concurrently. The first thing the method does it to check if it the OrganizationStructureProvider has been already initialized, but this is not enough to prevent the concurrent initializations.
One of the consequences of the concurrent initializations is that the three maps used in that method (naturalTreesByOrgID, parentByOrganizationID and childByOrganizationID) can be left in an inconsistent state, resulting in the a 100% CPU usage when trying to access them.
Gorka Ion Damián <gorkaion.damian@openbravo.com> [Wed, 07 Jan 2015 09:43:52 +0100] rev 25674
Merge with latest pi
Gorka Ion Damián <gorkaion.damian@openbravo.com> [Mon, 05 Jan 2015 17:48:58 +0100] rev 25673
Fix issue in merge unit cost project.
Gorka Ion Damián <gorkaion.damian@openbravo.com> [Mon, 05 Jan 2015 17:33:36 +0100] rev 25672
Fix issue in merge unit cost project.
Gorka Ion Damián <gorkaion.damian@openbravo.com> [Mon, 05 Jan 2015 16:47:23 +0100] rev 25671
Merge unit cost project.
Gorka Ion Damián <gorkaion.damian@openbravo.com> [Mon, 05 Jan 2015 12:18:46 +0100] rev 25670
Related to Issue
27395. Fix issue when calculating several trx
When calculating more than one transaction of the same product the first
transaction value amount is not considered.
Add a coalesce on the trigger for the cost amount
Do incremental updates instead of calculating the total amount.
Gorka Ion Damián <gorkaion.damian@openbravo.com> [Wed, 17 Dec 2014 19:06:50 +0100] rev 25669
Related to Issue
27395. Compatibility issues with oracle. Reset on cur change
- When the currency of a legal entity is changed the unit costs are deleted
and a message is prompt to the user to recalculate them again.
- Several performance issues in triggers and procedures.
- Modified organization selector to remove HQL query.
David Miguelez <david.miguelez@openbravo.com> [Tue, 11 Nov 2014 17:32:58 +0530] rev 25668
Fixes Issue
27395. Implements feat. Req. to add info about Product Unit Cost.
*Adds a new Table named M_Stock_Valuation to store Stock, Stock Valuation
and Unit Cost of a Product.
*Adds ModuleScript to fill this Table for existing Data.
*Adds Process to Reset this Table
*Modifies M_Transaction_Trg and adds M_Transaction_Cost_Trg to Update
the values of M_Stock_Valuation Table when Stock is introduced
and when the Cost is calculated or adjusted.
*Modifes M_Product_Trg to initialize the information of this Table
when the Product is created.
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 05 Jan 2015 16:59:32 +0100] rev 25667
Related with issue
28469: Removes comment that refers to deleted code
David Baz Fayos <david.baz@openbravo.com> [Mon, 05 Jan 2015 16:27:55 +0100] rev 25666
Fixed issue
26776: Re-added KS capabilities to filters
More info at http://wiki.openbravo.com/wiki/Projects:FK_Filter_Keyboard_Shortcuts
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 05 Jan 2015 16:26:06 +0100] rev 25665
Related with issue
28469: Updates copyright year in license text
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 05 Jan 2015 13:38:32 +0100] rev 25664
Fixes issue
28469: Masked string validation is properly done in editable grid
There were several problems that were preventing the handling of masked string validations from working properly:
1- The masked string validations were not being performed in grid view, due to this code in the validate function:
if (this.form && this.form.grid && this.form.grid._showingEditor) {
return;
}
That code was put there to prevent doing unneeded validations when a new record was created in the grid view (see issue https://issues.openbravo.com/view.php?id=19176). This issue remains fixed after re
moving these lines.
2- After fixing 1), the Save toolbar button was enabled in the grid view even if the row being edited had masked string validation errores. These happened because of a flaw in the logic to disable the butt
on:
this.setDisabled(... && !hasErrors && ...);
The button was being disabled when the editable form did not have errors, and enabled when the form had errors. Before fixing 1) this did not matter, as hasErrors was always false because the form item
was not being validated. This has been fixed by disabling the button when the form had validation errors.
3- Sometimes (i.e. when the validation was performed due to an autosave) the mask validation was not taken into account. This happened because the validation was added to the validation list of the test it
em, but not to the validation list of the grid field, that is where it was being taken from.
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 29 Dec 2014 18:34:58 +0100] rev 25663
Fixes issue
24577: Direct link works properly in grids with implicit filters
When a view was open by pasting a URL link (either in the address bar or in the quick view), the implicit filter of the header grid was always applied, even if the filters had been clea
red before obtaining the link.
This has been fixed by storing in the URL info about the grid filter clause state when the link is obtained. Then, when opening a view from that link, if there were no filter clauses wh
en the link was obtained, the grid will be initialized without them.
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 29 Dec 2014 12:22:58 +0100] rev 25662
Fixes bug
28396:Focus not placed in field group if form has no editable fields
The issue
28396 [1] describes a problem that happens when the first focused field is a field group. This other issue [2] describes a very similar problem, the only difference beinge that instead of being reproduced in general field groups, it was reproduced for the specific audit field group. Its fixes [3], [4] only solved the problem for that particular field group.
The present changeset fixes the problem in a more general way. Instead on checking the type of the field being focused (that will change depending of whether the field group is general or specific (audit, notes, attachments, etc) it calls isc.isA.SectionItem to see whether the focused field is a field group.
[1] https://issues.openbravo.com/view.php?id=28396
[2] https://issues.openbravo.com/view.php?id=28231
[3] https://code.openbravo.com/erp/devel/pi/rev/a72704b89964c9dd369c422ccefeecca16e26551
[4] https://code.openbravo.com/erp/devel/pi/rev/c523abe0e8115d406c7e2515be7aef9d5209ce73
Atul Gaware <atul.gaware@openbravo.com> [Wed, 31 Dec 2014 19:14:19 +0530] rev 25661
Fixes Issue
28197:RM Insert Orphan Line provides a field to provide attribute
set instance details for product if applicable.
New parameter is optional and process does not change if parameter is passed
in or not so API checks failure is false positive.
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 29 Dec 2014 18:40:27 +0100] rev 25660
Fixes bug
28499:Proper params are used when opening a link using the quick view
The problem was that the OB.Utilities.openDirecTab function, which is used to open a view using the Quick View and also when an URL is pasted in the address bar, tries to fetch the parameters from the current address bar URL. If the link has been entered in the Quick View the parameters won't be available in the address bar, whereas if the view is opened by entering the URL in the address window the view will be opened properly.
This has been fixed by adding the urlParams as an optional parameter to the openDirectTab function. If the parameter is not passed to the function then it will work as usual and it will take its values from the address bar. When the function is called from the quick view the proper parameters are passed, so in this case the url params are not taken from the address bar.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Tue, 30 Dec 2014 10:50:25 +0100] rev 25659
Related with issue
28414: Change the error that appears in the log.
An error appears in the log when accessing a window which has a button with not a process nor a process definition assigned to it.
The problem was that the fact of a button with not process nor process definition assigned to it was not taken into account and that was why an url and a command
where not defined.
For fixing this a condition has been added to the function "getURL" and other one to the function "getCommand".
Now if a url or a command is null, a dummy value is given to them. Now, as they have a value, that value can be transformed into a string and the NPE error disappears.
This handles the case when the button is already wrongly configured. In the next step we will avoid making this configuration mistakes in new buttons.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Wed, 24 Dec 2014 16:42:09 +0100] rev 25658
Fixed issue
28466: Autosave was executed when creating a new record.
When a window only has one subtab, and that subtab has a display logic, just after clicking the proper button to create a new
record in the header tab (both in grid and in form mode), the autosave is executed. This happens only the first time that a record is
created.
The problem was in the "updateSubtabVisibility" function of the "ob-standard-view.js".
The problem was that at first, in the function, there was a logic that was not taking into account the fact that if it was the record selected in the header tab has not been saved yet, its subtabs are empty, and it is not neccesary to refresh them.
Before the fix it tried to refresh the subtabs, which resulted in a call to autosave.
For fixing it a new condition has been added to the "updateSubtabVisibility" function. With this new condition
now, the call to the autosave is avoided in the case of the new record.
A new function called "isEditingNewRecord" has been created too. This function returns true if a new record is being edited in the view.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Mon, 29 Dec 2014 11:13:30 +0100] rev 25657
Related with issue
28466: Autosave was executed when creating a new record.
The function "saveEditorReply" of the "ob-view-form.js" class has been changed in order to not
having duplicate code.
Unai Martirena <unai.martirena@openbravo.com> [Fri, 02 Jan 2015 13:01:06 +0100] rev 25656
Fixed bug
28052: Wrong message processing a Shipment with a partial reservation.
Reallocation function executed when trying to complete a Goods Shipment, was changed to launch a not enough stock error if the quantity pending to release exceeds the available existent in the line's storage bin.
Unai Martirena <unai.martirena@openbravo.com> [Wed, 31 Dec 2014 16:16:00 +0100] rev 25655
Fixes Bug
28487: Fixed Null Pointer Exception.
The problem was that in updateBDCostingTimeRange function inside AverageCostAdjustment class, the code was trying to get the movement date of a Inventory Transaction related to a Costing record. But not all costing have Inventory Transaction, so it was giving a NPE.
Now, if there is a previous Costing record than the one created due to a backdated transaction, this Costing will be shortened till transaction process date, and the new Backdated costing record will start at that moment.
This only happens the first time that a related transaction is found that is not a backdated transaction, because if is done with a backdated transaction time overlap can happen.
Unai Martirena <unai.martirena@openbravo.com> [Wed, 31 Dec 2014 13:50:58 +0100] rev 25654
Fixes bug
28509: Inventory Amt Update now works with negative stock.
In this case the Qty Count and Qty Book have been reverted in the Physical Inventory Lines and negate them to make them positive, maintaining the difference between them to create the same transaction quantity.
Also getInventoryClosingCost function in AverageAlgorithm has been changed to negate the cost obtained from an inventory closing when the movement qty is positive (closing from negative to 0), because the cost obtained was negative, and this is wrong.
Unai Martirena <unai.martirena@openbravo.com> [Wed, 31 Dec 2014 11:03:15 +0100] rev 25653
Fixes bug
28502: Inv Amt Update takes into account Costing Rule warehouse dim
The problem was that the process was checking if the warehouse in Inventory Amount Update is null or not, and if not, it uses it. This is correct when the Costing Rule is set as Warehouse Dimension, but if is not, it should not use it, and even if the Costing Rule is not set as Warehouse Dimension and the warehouse field is hidden in Inventory Amount Lines, it is filled with the Warehouse set in session value.
RM packaging bot <staff.rm@openbravo.com> [Tue, 30 Dec 2014 22:17:38 +0000] rev 25652
CI: merge back from main
RM packaging bot <staff.rm@openbravo.com> [Tue, 30 Dec 2014 21:49:22 +0000] rev 25651
CI: update AD_MODULE to version 25650
Sandra Huguet <sandra.huguet@openbravo.com> [Tue, 30 Dec 2014 16:23:08 +0100] rev 25650
Related to issue
27580 fixed issue to cash vat purchase invoices
Sandra Huguet <sandra.huguet@openbravo.com> [Tue, 30 Dec 2014 14:01:29 +0100] rev 25649
Related to issue
27580 fixed issue to cash vat invoices
Augusto Mauch <augusto.mauch@openbravo.com> [Tue, 30 Dec 2014 12:57:04 +0100] rev 25648
Fixes issue
28501: Window is property loaded having read only tabs
There was a problem in the way read only tabs were initialized. It was caused by this changeset [1], which fixed a problem related with read only tabs loaded lazily. The problem is that under some circumstances the setReadOnly function of the standard view was called without it being fully initialized. The setReadOnly invokation ended up calling the OBViewGrid.resetEmptyMessage function, and tried to execute this line:
this.view.parentView.isShowingTree
The problem is that the parentView property of the view was not set yet, so an error was thrown. To fix this, now the code to update some view properties based in its uiPattern value is executed after the parentView property is properly set.
[1] https://code.openbravo.com/erp/devel/pi/rev/052c07be4a9ddd2b2a61bd60e948370c53482cb4