Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013853Openbravo ERP09. Financial managementpublic2010-06-30 20:102010-07-23 00:00
plujan 
adrianromero 
immediateminorhave not tried
closedfixed 
5
2.50 
 
No
Core
No
0013853: Having two clients with separated accounting background processes, I have to unscheduled both in order to post accounting
G/L Posting by DB tables process asked me to verify that no background process was running. I've checked it but the message was still there. So, by querying the database I discovered the problem was an scheduled process from another client running in the same context. See steps.
Scenario:
Two clients, clientA and clientB
Process request for Accounting was disabled for * (done by System Admin)

Steps:
Enter as clientA_Admin
Schedule an accounting process to run hourly.
Enter as clientB_Admin
Schedule an accounting process to run hourly.
Still as clientB_Admin, go to Financial Management > Accounting > Transactions > G/L Posting by DB tables
Run the process with the combo boxes left blank
You get a proper message, you cannot do it if Accounting is running.
Go to Process request and unschedule the Accounting. Note that since you are clientB user you see only the process for clientB and the process for *.
Run the G/L Posting again.
You get the wrong message, now you should be able to run the process since no accounting is running for your client.
Enter as clientA_Admin
Unschedule the Accounting process
Enter as clientB_Admin
Run the G/L Posting again.
Now you can run the process.
The query made in the button to verify if process can be launched is:

SELECT AD_Process_Request_ID AS Id, AD_Process_ID AS Process_Id,
        AD_Client_ID AS Client, AD_Org_Id AS Organization, AD_User_ID AS UserId,
        IsRoleSecurity, Status, Channel, Ob_Context, Params, AD_Process_Set_Id
        FROM AD_Process_Request
        WHERE AD_Process_Id = ?

I think an extra WHERE condition has to be added:
AND (ad_client_id=0 or ad_client_id=CURRENT_CLIENT_ID)
Regression
Issue History
2010-06-30 20:10plujanNew Issue
2010-06-30 20:10plujanAssigned To => adrianromero
2010-06-30 20:10plujanOBNetwork customer => No
2010-06-30 20:10plujanTag Attached: Regression
2010-06-30 20:12plujanNote Added: 0028936
2010-07-01 10:17psarobePriorityurgent => immediate
2010-07-01 10:17psarobeStatusnew => scheduled
2010-07-01 10:17psarobeversionmain => 2.50
2010-07-01 16:15hgbotCheckin
2010-07-01 16:15hgbotNote Added: 0028953
2010-07-01 16:15hgbotStatusscheduled => resolved
2010-07-01 16:15hgbotResolutionopen => fixed
2010-07-01 16:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e5413a3c8842b127a35619c893ed5410c0b07ef6 [^]
2010-07-01 16:38adrianromeroNote Added: 0028957
2010-07-02 14:51hudsonbotCheckin
2010-07-02 14:51hudsonbotNote Added: 0029004
2010-07-22 08:58sureshbabuNote Added: 0029462
2010-07-22 08:58sureshbabuStatusresolved => closed
2010-07-23 00:00anonymoussf_bug_id0 => 3033265

Notes
(0028936)
plujan   
2010-06-30 20:12   
This is a regression since the new process scheduler (more than a year ago). Previous to that, only one process could exist so the message has more sense.
(0028953)
hgbot   
2010-07-01 16:15   
Repository: erp/devel/pi
Changeset: e5413a3c8842b127a35619c893ed5410c0b07ef6
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jul 01 16:14:52 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e5413a3c8842b127a35619c893ed5410c0b07ef6 [^]

Fixes issue 0013853: Having two clients with separated accounting background processes, I have to unscheduled both in order to post accounting
It has been added the proposed solution that filters the processes actives by the client 0 or the current client

---
M src/org/openbravo/erpCommon/ad_forms/CallAcctServer.java
M src/org/openbravo/erpCommon/ad_forms/CallAcctServer_data.xsql
---
(0028957)
adrianromero   
2010-07-01 16:38   
* Testing of the issue

Follow the steps to reproduce and notice that you can run the accounting for one client even when there are other accounting processes running for other clients

* Other areas affected

Only the process that schedules accounting is affected, no other processes or functionality needs to be tested.
(0029004)
hudsonbot   
2010-07-02 14:51   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/e5413a3c8842 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/8fd5a427789e [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17797.obx [^]
(0029462)
sureshbabu   
2010-07-22 08:58   
verified