Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0015947 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | major | always | 2011-02-01 16:38 | 2011-05-24 10:56 | |||
Reporter | mirurita | View Status | public | |||||
Assigned To | mirurita | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | 2.50 | Fixed in SCM revision | 6c7a48f22414 | |||
Projection | none | ETA | none | Target Version | 2.50MP27 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | 2.50MP25EU2 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0015947: @AD_Org_Id@ not working properly in a default value for a column | |||||||
Description | The FIN_Payment_Priority_ID column of C_Invoice and C_Order tables has the following default value: @SQL=SELECT FIN_Payment_Priority_ID FROM FIN_Payment_Priority WHERE AD_ISORGINCLUDED(@AD_Org_ID@, AD_Org_ID, @#AD_Client_ID@) <> -1 AND Isdefault = 'Y' ORDER BY Priority For example in SalesInvoice, looking at the WAD generated code in org.openbravo.erpWindows.SalesInvoice.Header.java it gets the default value for payment priority using this sql SELECT FIN_Payment_Priority_ID FROM FIN_Payment_Priority WHERE AD_ISORGINCLUDED(?, AD_Org_ID, ?) <> -1 AND Isdefault = 'Y' ORDER BY Priority and the first parameter is passes through Line 864 data = HeaderData.set(HeaderData.selectDef0445FEDA79A747C48A7B3EF852D176DC(this, Utility.getContext(this, vars, "AD_Org_ID", "167"), ...) When creating a new Sales Invoice the Utility.getContext(this, vars, "AD_Org_ID", "167") stores the organization id of the last visited (opened in edit view) sales invoice. You will realize that if you first open in edit view a sales invoice of organization Main and then you create a new sales invoice the Utility.getContext(this, vars, "AD_Org_ID", "167") will return '1000000', which is the Main id. But the combo box of organization is selecting organization A. If you open in edit view a sales invoice of organization A and then you create a new sales invoice the Utility.getContext(this, vars, "AD_Org_ID", "167") will return '1000002', which is the A id. On this case the payment priority default value will be properly assigned. | |||||||
Steps To Reproduce | 1) In 2.50 environment clone and install Payment Priorities module https://code.openbravo.com/erp/pmods/org.openbravo.financial.paymentpriorities/ [^] 1.1) Download from central repository last Selector for 2.50 module. 1.2) Clone APRM for 2.50 https://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/ [^] 2) Go to Financial Management || Receivables & Payables || Setup || Payment Priority || Payment Priority window and create the following priorities: Org: A Name: High Priority: 1 Default: No Org: A Name: Standard Priority: 2 Default: Yes At this point, if we create a new Sales/Purchase Invoice/Order for organization A it should select by default 'Standard' payment priority. 3) Important: open in edit view a existing Sales Invoice for organization Main. 4) Click on new button and notice that the payment priority is empty. | |||||||
Tags | closingMay2011 | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0034142) hgbot (developer) 2011-02-10 20:02 |
Repository: erp/stable/2.50 Changeset: 6c7a48f224145ef8501334d51cdd851ffdded904 Author: Mikel Irurita <mikel.irurita <at> openbravo.com> Date: Thu Feb 10 20:01:58 2011 +0100 URL: http://code.openbravo.com/erp/stable/2.50/rev/6c7a48f224145ef8501334d51cdd851ffdded904 [^] Fixes issue 15947: @AD_Org_Id@ not working properly --- M src-db/database/sourcedata/AD_COLUMN.xml --- |
![]() |
|||
Date Modified | Username | Field | Change |
2011-02-10 19:59 | mirurita | Type | defect => backport |
2011-02-10 19:59 | mirurita | fix_in_branch | => 2.50 |
2011-02-10 20:02 | hgbot | Checkin | |
2011-02-10 20:02 | hgbot | Note Added: 0034142 | |
2011-02-10 20:02 | hgbot | Status | scheduled => resolved |
2011-02-10 20:02 | hgbot | Resolution | open => fixed |
2011-02-10 20:02 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/fc82f636ea78dee874cf36439b23226b84790fef [^] => http://code.openbravo.com/erp/stable/2.50/rev/6c7a48f224145ef8501334d51cdd851ffdded904 [^] |
2011-05-24 10:08 | dalsasua | Tag Attached: closingMay2011 | |
2011-05-24 10:56 | dalsasua | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |