Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031015Openbravo ERP09. Financial managementpublic2015-10-01 18:282015-11-23 21:16
egoitz 
vmromanos 
immediatemajoralways
closedfixed 
5
 
 
dmiguelez
Core
Production - QA Approved
2015-05-07
3.0PR15Q3
https://code.openbravo.com/erp/devel/pi/rev/72e2b8bfe6fcf24641d900e00cdb6c38a0731483 [^]
No
0031015: ON the sales order window when selecting a organization that has not got document types some fields are hidden
When creating a new sales order, if the org selected on the combo has not got applicable document types, the organization and partner fields are not shown and the window is not usable until you close it and open again.
-Deactivate all the document types that applies to sales order window
-go to sales order window
-click on new
*See that the organization and partner fields are not shown
No tags attached.
depends on backport 00310213.0PR15Q4 closed vmromanos ON the sales order window when selecting a organization that has not got document types some fields are hidden 
depends on backport 00310223.0PR15Q3.2 closed vmromanos ON the sales order window when selecting a organization that has not got document types some fields are hidden 
caused by defect 00297673.0PR15Q3 closed aferraz "Display logic for grid column" not working for Organization, Business Partner and Product dimensions 
Issue History
2015-10-01 18:28egoitzNew Issue
2015-10-01 18:28egoitzAssigned To => Triage Finance
2015-10-01 18:28egoitzModules => Core
2015-10-01 18:28egoitzResolution time => 1443996000
2015-10-01 18:28egoitzRegression level => Production - QA Approved
2015-10-01 18:28egoitzTriggers an Emergency Pack => No
2015-10-02 09:09vmromanosNote Added: 0080799
2015-10-02 09:09vmromanosAssigned ToTriage Finance => vmromanos
2015-10-02 09:09vmromanosStatusnew => acknowledged
2015-10-02 10:00vmromanosRelationship addedcaused by 0029767
2015-10-02 11:23vmromanosRegression date => 2015-05-07
2015-10-02 11:23vmromanosRegression introduced in release => 3.0PR15Q3
2015-10-02 11:23vmromanosRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/72e2b8bfe6fcf24641d900e00cdb6c38a0731483 [^]
2015-10-02 11:41vmromanosStatusacknowledged => scheduled
2015-10-02 12:27heccamIssue Monitored: heccam
2015-10-02 12:48vmromanosNote Added: 0080804
2015-10-05 14:40psanjuanNote Edited: 0080804bug_revision_view_page.php?bugnote_id=0080804#r9600
2015-10-05 14:45psanjuanNote Edited: 0080804bug_revision_view_page.php?bugnote_id=0080804#r9601
2015-10-05 14:52psanjuanNote Edited: 0080804bug_revision_view_page.php?bugnote_id=0080804#r9602
2015-10-05 14:54psanjuanNote Added: 0080824
2015-10-05 14:56psanjuanNote Edited: 0080824bug_revision_view_page.php?bugnote_id=0080824#r9604
2015-10-05 14:56psanjuanNote Edited: 0080804bug_revision_view_page.php?bugnote_id=0080804#r9605
2015-10-05 16:42hgbotCheckin
2015-10-05 16:42hgbotNote Added: 0080827
2015-10-05 16:42hgbotStatusscheduled => resolved
2015-10-05 16:42hgbotResolutionopen => fixed
2015-10-05 16:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/466fc38112d4b64690f0fa03f52211070be9c487 [^]
2015-10-05 16:43dmiguelezReview Assigned To => dmiguelez
2015-10-05 16:43dmiguelezNote Added: 0080829
2015-10-05 16:43dmiguelezStatusresolved => closed
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082110
2016-05-30 12:13aferrazRelationship addedrelated to 0033040
2016-05-31 13:23aferrazRelationship deletedrelated to 0033040

Notes
(0080799)
vmromanos   
2015-10-02 09:09   
The problem seems to be in the display logic of the accounting dimensions:

(context.$IsAcctDimCentrally === 'N' && context.$Element_OO === 'Y')
   ||
(context.$IsAcctDimCentrally === 'Y' && context['$Element_OO_' + OB.Utilities.getValue(currentValues, "DOCBASETYPE") + '_H'] === 'Y')

The DOCBASETYPE is null at this point, so the field is hidden.
(0080804)
vmromanos   
2015-10-02 12:48   
(edited on: 2015-10-05 14:56)
Test plan:

As Openbravo Admin

Go to Purchase Invoice
Create a new record.
Verify Organization and Business Partner fields are shown.
Enter a new line and save it. Verify it works fine

Go to Sales Invoice
Create a new record.
Verify Organization and Business Partner fields are shown.
Enter a new line and save it. Verify it works fine

Go to Purchase Order
Create a new record.
Verify Organization and Business Partner fields are shown.
Enter a new line and save it. Verify it works fine

Go to Sales Order
Create a new record.
Verify Organization and Business Partner fields are shown.
Enter a new line and save it. Verify it works fine

Go to Payment In
Create a new record.
Verify Organization and Business Partner fields are shown.

Go to Payment Out
Create a new record.
Verify Organization and Business Partner fields are shown.


Go to Document Type
Select C_Order table
Change active = N for all the records in this table

Go to Purchase Order
Create a new record.
Verify Organization and Business Partner fields are shown but no Transaction Document can be selected.

Go to Sales Order
Create a new record.
Verify Organization and Business Partner fields are shown but no Transaction Document can be selected.

Go to Document Type window and set as Active=Yes, document types related just to Purchase Order (Purchase Order and Purchase Requisition).
Go to Purchase Order
Create a new record.
Verify Organization and Business Partner fields are shown, same as Transaction Document.

Go to Document Type window and set as Active=Yes, all document types related to Sales Order but Standard Order.
Go to Sales Order
Create a new record.
Verify Organization and Business Partner fields are shown, same as Transaction Document.
Verify that Standard Order can not be selected in the field "Transaction Document".

Go to Document Type
Select C_Invoice table
Change active = N for all the records in this table

Go to Purchase Invoice
Create a new record.
Verify Organization and Business Partner fields are shown but no Transaction Document is shown.

Go to Sales Invoice
Create a new record.
Verify Organization and Business Partner fields are shown but no Transaction Document is shown.

Go to Document Type window and set as Active=Yes, all document types related to Sales Invoice.
Go to Sales Invoice
Create a new record.
Verify Organization and Business Partner fields are shown, same as Transaction Document.
Go to Purchase Invoice.
Verify Organization and Business Partner fields are shown, but Transaction Document.

Create a new record.
Go to Document Type
Select FIN_Payment table
Change active = N for all the records in this table

Go to Payment In
Create a new record.
Verify Organization and Business Partner fields are shown, but Document Type.

Go to Payment Out
Create a new record.
Verify Organization and Business Partner fields are shown, but Document Type.

(0080824)
psanjuan   
2015-10-05 14:54   
(edited on: 2015-10-05 14:56)
Test above verified.
Issue can be closed.

(0080827)
hgbot   
2015-10-05 16:42   
Repository: erp/devel/pi
Changeset: 466fc38112d4b64690f0fa03f52211070be9c487
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Oct 02 12:39:49 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/466fc38112d4b64690f0fa03f52211070be9c487 [^]

Fixed bug 31015: hidden fields in several windows related to acct. dimensions

The display logic of some fields driven by the accounting dimension display logic utility was not working fine when the auxiliary input "DOCBASETYPE" (used by to calculate the acct. dimension display logic) was null.
This auxiliary input has a hardcoded value in some windows, however in other windows it is gotten from the DB using the selected document type. In the latter scenario, when the document type field is blank, the "DOCBASETYPE" auxiliary input was null, so the system was unable to detect the right configuration, thus hiding the fields.

The regression is caused by issue 0029767. The business partner and organization fields were configured to use the accounting dimension display logic utility in the following windows:
* Sales Order
* Purchase Order
* Sales Invoice
* Purchase Invoice
* Payment In (not affected as it has a hardcoded "DOCBASETYPE")
* Payment Out (not affected as it has a hardcoded "DOCBASETYPE")

The fix improves the SQL for getting the "DOCBASETYPE" auxiliary input in the affected windows, so in case the document type is null, a generic value (the most commonly used) is returned depending on the window:
* Sales Order: SOO
* Purchase Order: POO
* Sales Invoice: ARI
* Purchase Invoice: API

---
M src-db/database/sourcedata/AD_AUXILIARINPUT.xml
---
(0080829)
dmiguelez   
2015-10-05 16:43   
Code Review + Testing Ok
(0082110)
hudsonbot   
2015-11-23 21:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test