Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0015834 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2011-02-01 16:38 | 2011-02-15 00:00 | |||
Reporter | mirurita | View Status | public | |||||
Assigned To | mirurita | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | fc82f636ea78 | ||||
Projection | none | ETA | none | Target Version | 3.0RC4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | 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 | 0015834: @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 | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0034140) hgbot (developer) 2011-02-10 19:57 |
Repository: erp/devel/pi Changeset: fc82f636ea78dee874cf36439b23226b84790fef Author: Mikel Irurita <mikel.irurita <at> openbravo.com> Date: Thu Feb 10 19:56:03 2011 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/fc82f636ea78dee874cf36439b23226b84790fef [^] Fixes issue 15834: @AD_Org_Id@ not working properly --- M src-db/database/sourcedata/AD_COLUMN.xml --- |
(0034182) psanjuan (viewer) 2011-02-14 16:59 |
fixed and working |
![]() |
|||
Date Modified | Username | Field | Change |
2011-02-01 16:38 | mirurita | New Issue | |
2011-02-01 16:38 | mirurita | Assigned To | => alostale |
2011-02-01 16:38 | mirurita | Modules | => Core |
2011-02-01 16:38 | mirurita | OBNetwork customer | => No |
2011-02-01 16:40 | mirurita | File Added: aprm.diff | |
2011-02-01 16:40 | mirurita | File Added: core.diff | |
2011-02-01 16:40 | mirurita | Summary | Default value @AD_Org_Id@ value not working properly => @AD_Org_Id@ not working properly in a default value for a column |
2011-02-01 16:41 | mirurita | Target Version | => 2.50MP27 |
2011-02-01 19:12 | mirurita | Steps to Reproduce Updated | View Revisions |
2011-02-01 19:12 | mirurita | File Deleted: aprm.diff | |
2011-02-01 19:13 | mirurita | File Deleted: core.diff | |
2011-02-07 08:31 | alostale | Status | new => scheduled |
2011-02-10 19:53 | mirurita | Assigned To | alostale => mirurita |
2011-02-10 19:57 | hgbot | Checkin | |
2011-02-10 19:57 | hgbot | Note Added: 0034140 | |
2011-02-10 19:57 | hgbot | Status | scheduled => resolved |
2011-02-10 19:57 | hgbot | Resolution | open => fixed |
2011-02-10 19:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/fc82f636ea78dee874cf36439b23226b84790fef [^] |
2011-02-10 19:58 | mirurita | Status | resolved => new |
2011-02-10 19:58 | mirurita | Resolution | fixed => open |
2011-02-10 19:59 | mirurita | Status | new => scheduled |
2011-02-10 19:59 | mirurita | fix_in_branch | => pi |
2011-02-10 19:59 | mirurita | version | 2.50MP25EU2 => pi |
2011-02-10 19:59 | mirurita | Target Version | 2.50MP27 => 3.0RC4 |
2011-02-10 19:59 | mirurita | fix_in_branch | pi => |
2011-02-10 20:00 | mirurita | Status | scheduled => resolved |
2011-02-10 20:00 | mirurita | Resolution | open => fixed |
2011-02-14 16:59 | psanjuan | Note Added: 0034182 | |
2011-02-14 16:59 | psanjuan | Status | resolved => closed |
2011-02-15 00:00 | anonymous | sf_bug_id | 0 => 3181409 |
Copyright © 2000 - 2009 MantisBT Group |