Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018998Openbravo ERP09. Financial managementpublic2011-11-07 00:302012-06-26 17:56
pjuvara 
eduardo_Argal 
normalmajoralways
closedfixed 
5
3.0MP4 
3.0MP13 
Core
No
0018998: Copy GL Journal does not respect organization of original batch
When I copy a GL Journal, all the lines in the new journal take the organization of the new batch instead of taking the organization of the original batch that I was copying from.
See attached video.
AccountingDemo
depends on feature request 0018996 closed eduardo_Argal Organization field should be displayed in GL Journal lines to enable department cross charges 
? out.ogv (4,540,166) 2011-11-07 00:30
https://issues.openbravo.com/file_download.php?file_id=4725&type=bug
Issue History
2011-11-07 00:30pjuvaraNew Issue
2011-11-07 00:30pjuvaraAssigned To => jonalegriaesarte
2011-11-07 00:30pjuvaraFile Added: out.ogv
2011-11-07 00:30pjuvaraModules => Core
2011-11-07 00:34pjuvaraNote Added: 0042641
2011-11-07 00:34pjuvaraRelationship addeddepends on 0018996
2011-11-07 01:43pjuvaraTag Attached: AccountingDemo
2012-06-12 18:50eduardo_ArgalStatusnew => scheduled
2012-06-12 18:50eduardo_ArgalAssigned Tojonalegriaesarte => eduardo_Argal
2012-06-12 18:50eduardo_Argalfix_in_branch => pi
2012-06-13 09:50hgbotCheckin
2012-06-13 09:50hgbotNote Added: 0049792
2012-06-13 09:50hgbotStatusscheduled => resolved
2012-06-13 09:50hgbotResolutionopen => fixed
2012-06-13 09:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8f9fe48cbf5cdd366d07c1fded3517f741f03fc7 [^]
2012-06-13 10:33eduardo_ArgalNote Added: 0049796
2012-06-13 12:31eduardo_ArgalNote Added: 0049804
2012-06-13 12:31eduardo_ArgalStatusresolved => new
2012-06-13 12:31eduardo_ArgalResolutionfixed => open
2012-06-13 12:31eduardo_ArgalStatusnew => scheduled
2012-06-13 12:49hgbotCheckin
2012-06-13 12:49hgbotNote Added: 0049808
2012-06-13 12:49hgbotStatusscheduled => resolved
2012-06-13 12:49hgbotResolutionopen => fixed
2012-06-13 12:49hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/8f9fe48cbf5cdd366d07c1fded3517f741f03fc7 [^] => http://code.openbravo.com/erp/devel/pi/rev/4bd3811f32a2e5e02885d2d9b935533d5787ff4c [^]
2012-06-26 17:56miruritaNote Added: 0050106
2012-06-26 17:56miruritaStatusresolved => closed
2012-06-26 17:56miruritaFixed in Version => 3.0MP13

Notes
(0042641)
pjuvara   
2011-11-07 00:34   
When fixing this issue, care should be taken to avoid functional regressions.

If I have two organizations A and B and I create a journal with all lines in A, then I can copy that journal into organization B and I should expect that all lines are moved to organization B.

However, if I have a journal in organization A with lines across organizations B and C and I copy that journal again into A, the resulting lines should be across B and C.

In other words:
1) If the target batch is in the same organization as source batch, target lines should take organization from source lines
2) If the target batch is in a different organization than source batch, target lines should take organization from target batch.
(0049792)
hgbot   
2012-06-13 09:50   
Repository: erp/devel/pi
Changeset: 8f9fe48cbf5cdd366d07c1fded3517f741f03fc7
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Tue Jun 12 18:51:10 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8f9fe48cbf5cdd366d07c1fded3517f741f03fc7 [^]

Fixes bug 18998

---
M src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java
M src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal_data.xsql
---
(0049796)
eduardo_Argal   
2012-06-13 10:33   
TESTING PLAN:

1) Create a GLJournal and flag it as template. It should contain lines using different organizations
2) Create a new one and copy details from previous.
3) Mind that newly created lines are pointing to organizations which are the same as the source (that from which you are coping and not the organization of the header)
(0049804)
eduardo_Argal   
2012-06-13 12:31   
Previous change was not complete. New change set required
(0049808)
hgbot   
2012-06-13 12:49   
Repository: erp/devel/pi
Changeset: 4bd3811f32a2e5e02885d2d9b935533d5787ff4c
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Wed Jun 13 12:33:11 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4bd3811f32a2e5e02885d2d9b935533d5787ff4c [^]

Fixes bug 18998. [Related to commit 8f9fe48cbf5c] Missing change in previous commit

---
M src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java
---
(0050106)
mirurita   
2012-06-26 17:56   
Related issue 0020746: it was possible to copy a G/L journal from a organization not in the same tree. For example, you could copy in 'F&B US, Inc.' line details from a G/L journal created for 'F&B EspaƱa, S.A'.

From a target batch you should be able to copy only batches that belong to the same org or child orgs. It is consistent with the behavior using the UI.

1) If I have two organizations A and B and I create a journal with all lines in A, then I can copy that journal into organization B and I should expect that all lines are moved to organization B.
As explained before (issue 0020746), this scenario is only possible if org A is a child of org B. In that case, target lines will be created for org A.

2) Working fine.