Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013274Openbravo ERP01. General setuppublic2010-05-10 14:112010-06-17 00:00
nataliaperu 
harikrishnan 
urgentmajoralways
closedfixed 
5
pi 
 
Core
No
0013274: "Create a new account for BP" does not filter by Client
More than one client is used in same environment.

Both have diferent COA.

In one client, Organization * is defined to create a new account for each BP created in the application. In fact, a sequence is used for it.

This sequence uses numbers, that any account has.

When entering a new BP this error appears:

"This is already a Account Element with same (Accounting Element, Search Key) (Accounting Element, Search Key) must be unique. You must change values entered.

It seems that this function is using SmallBazaar COA.
Create a new entity, for Mexican COA [sourceforge.net/projects/openbravo/files/04-openbravo-accounting/2.50, 2.40 and 2.35/AccountsMXOpenbravo.csv/download]

Change rol to new entity Admin.

Create a new organization (Initial Organization setup), as Legal with Accounting, using same COA.

Go to Organization window, and search the new one.
Check it as "Allow period control", and select the calendar.
Press "Set as ready".

Go to Financial Management > Accounting > Setup > Document sequence.
Createa a new one, as Autonumbering. As initial number, set 70000.
Go to Organization (*) > Org Schema, and select "Create a new account for BP", and select the sequence created.
As account length, and subaccount length, set 5.

Go to Master Data Management > Business Partner Setup > Business Partner Category.
Create a new one, called "Customer".

Go to Master Data Management > Business Partner.
Create a new one.

No tags attached.
Issue History
2010-05-10 14:11nataliaperuNew Issue
2010-05-10 14:11nataliaperuAssigned To => adrianromero
2010-05-13 12:31adrianromeroStatusnew => scheduled
2010-05-13 12:31adrianromerofix_in_branch => pi
2010-05-19 16:59adrianromeroNote Added: 0027564
2010-05-19 16:59adrianromeroStatusscheduled => feedback
2010-05-20 14:25adrianromeroStatusfeedback => scheduled
2010-05-20 14:26harikrishnanAssigned Toadrianromero => harikrishnan
2010-05-20 14:29hgbotCheckin
2010-05-20 14:29hgbotNote Added: 0027607
2010-05-20 14:29hgbotStatusscheduled => resolved
2010-05-20 14:29hgbotResolutionopen => fixed
2010-05-20 14:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c4c2e83df2d3d3e5121f9190624b74c8eee33604 [^]
2010-05-20 14:30harikrishnanNote Added: 0027608
2010-05-21 07:31hgbotCheckin
2010-05-21 07:31hgbotNote Added: 0027624
2010-05-21 07:31hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/c4c2e83df2d3d3e5121f9190624b74c8eee33604 [^] => http://code.openbravo.com/erp/devel/pi/rev/6acd1e0a7c950f4e288ba568fda619b8c30bcf81 [^]
2010-05-29 09:47hudsonbotCheckin
2010-05-29 09:47hudsonbotNote Added: 0027821
2010-05-29 09:47hudsonbotCheckin
2010-05-29 09:47hudsonbotNote Added: 0027823
2010-06-15 17:58psarobeStatusresolved => new
2010-06-15 17:58psarobeResolutionfixed => open
2010-06-15 17:59psarobeNote Added: 0028457
2010-06-15 17:59psarobeStatusnew => scheduled
2010-06-16 07:18harikrishnanNote Added: 0028485
2010-06-16 07:18harikrishnanStatusscheduled => resolved
2010-06-16 07:18harikrishnanResolutionopen => fixed
2010-06-16 07:19arunkumarNote Added: 0028486
2010-06-16 07:19arunkumarStatusresolved => closed
2010-06-17 00:00anonymoussf_bug_id0 => 3017323

Notes
(0027564)
adrianromero   
2010-05-19 16:59   
The reason why it fails to create a new BP is because it are not defined neither the values Account Length nor Subaccount Length when there is checked the Create New Account for Business Partner field or Product field. These values have to be defined and also Subaccount Length must be greater than Account Length.
(0027607)
hgbot   
2010-05-20 14:29   
Repository: erp/devel/pi
Changeset: c4c2e83df2d3d3e5121f9190624b74c8eee33604
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Thu May 20 17:58:34 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/c4c2e83df2d3d3e5121f9190624b74c8eee33604 [^]

Fixes Issue 13274 In the function c_validcombination_clone their is a logic for generating the new value for the element value.In this logic they are subtracting the Account Length from Sub account Length.Hence if both are equal this value will become zero.Hence a both the values are checked in the org schema trigger.

---
M src-db/database/model/triggers/C_BPARTNER_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
A src-db/database/model/triggers/AD_ORG_ACCTSCHEMA_TRG2.xml
---
(0027608)
harikrishnan   
2010-05-20 14:30   
Steps to reproduce:

*Create a new client, organisation and business partner for the Organisation.

Root Cause:

In the function c_validcombination_clone their is a logic for generating the new value for the element value.In this logic they are subtracting the Account Length from Sub account Length.Hence if both are equal this value ll become zero.Hence a both the values are checked in the org schema trigger.

Impact:

Since i have checked only the not null in the trigger C_Bpartner_TRG.xml ,hence their is no impact in the existing functinality.
(0027624)
hgbot   
2010-05-21 07:31   
Repository: erp/devel/pi
Changeset: 6acd1e0a7c950f4e288ba568fda619b8c30bcf81
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Fri May 21 11:00:28 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/6acd1e0a7c950f4e288ba568fda619b8c30bcf81 [^]

Fixes issue 13274 changes done for trigger should not work while deleting the record.

---
M src-db/database/model/triggers/AD_ORG_ACCTSCHEMA_TRG2.xml
---
(0027821)
hudsonbot   
2010-05-29 09:47   
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/c4c2e83df2d3 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/000000000000 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17407.obx [^]
(0027823)
hudsonbot   
2010-05-29 09:47   
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/6acd1e0a7c95 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/000000000000 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17407.obx [^]
(0028457)
psarobe   
2010-06-15 17:59   
Arun is talking with the developer
(0028485)
harikrishnan   
2010-06-16 07:18   
Unable to reproduce.
(0028486)
arunkumar   
2010-06-16 07:19   
I was trying to reproduce the issue in a fresh environment. I am unable to reproduce this. I am closing the issue.