Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020142Openbravo ERP07. Sales managementpublic2012-03-28 17:592012-05-25 12:12
dmiguelez 
mirurita 
normalmajoralways
closedfixed 
20Community Appliance
pi 
3.0MP12 
Core
No
0020142: In Exchange Rate tab, in Sales Invoice Window, it allows to enter more than one exchange rate for the same pair of currencies.
In Exchange Rate tab, in Sales Invoice Window, it allows to enter more than one exchange rate for the same pair of currencies. That is wrong.
Login as Openbravo/openbravo.

Go to Sales Invoice.
Create a new one with Organization: F&B US Inc.
Navigate to Exchange Rates tab.
Create a new one with Currency: USD To Currency: EUR Rate 20
Create a new one with Currency: USD To Currency: EUR Rate 50
In the database, add a constraint that checks that the group of values currency, tocurrency and invoice are unique
VMA-Reviewed
related to defect 0020371 closed alostale Unique constraint in PostgreSQL not working with nullable columns 
related to feature request 0020505 new Triage Platform Base Validate during export.database any unique constraint containing nullable columns 
related to defect 0020901 closed eduardo_Argal Build validation problem when upgrading from 2.50MP41 to 3.0MP12 
Issue History
2012-03-28 17:59dmiguelezNew Issue
2012-03-28 17:59dmiguelezAssigned To => vmromanos
2012-03-28 17:59dmiguelezModules => Core
2012-04-11 11:38vmromanosTag Attached: VMA-Reviewed
2012-04-24 17:31vmromanosNote Added: 0047928
2012-04-27 12:33miruritaRelationship addedrelated to 0020371
2012-04-27 12:34miruritaNote Added: 0048139
2012-05-10 12:12gorka_gilAssigned Tovmromanos => mirurita
2012-05-14 18:48vmromanosNote Added: 0048632
2012-05-14 19:03hgbotCheckin
2012-05-14 19:03hgbotNote Added: 0048633
2012-05-14 19:03hgbotStatusnew => resolved
2012-05-14 19:03hgbotResolutionopen => fixed
2012-05-14 19:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/47bed64aeb30a1220188509886091407b148e309 [^]
2012-05-14 19:03hgbotCheckin
2012-05-14 19:03hgbotNote Added: 0048634
2012-05-14 19:03vmromanosNote Added: 0048635
2012-05-14 19:03vmromanosStatusresolved => closed
2012-05-14 19:03vmromanosFixed in Version => 3.0MP12
2012-05-15 16:23miruritaRelationship addedrelated to 0020505
2012-05-16 16:53hgbotCheckin
2012-05-16 16:53hgbotNote Added: 0048704
2012-05-16 19:02hgbotCheckin
2012-05-16 19:02hgbotNote Added: 0048713
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049123
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049124
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049146
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049152
2012-06-29 14:01vmromanosRelationship addedrelated to 0020901

Notes
(0047928)
vmromanos   
2012-04-24 17:31   
Create a build validation + alerts apart from the new DB constraint
(0048139)
mirurita   
2012-04-27 12:34   
It only fails in PostgreSQL database (see related issue 0020371).
(0048632)
vmromanos   
2012-05-14 18:48   
Test plan I (trigger):
1. Go to Sales Invoice.
2. Create a new one with Organization: F&B US Inc.
3. Navigate to Exchange Rates tab.
4. Create a new one with Currency: USD To Currency: EUR Rate 20
5. Create a new one with Currency: USD To Currency: EUR Rate 50
6. An error should be displayed. The record is not saved

Test plan II (trigger):
1. Go to Payment In.
2. Create a new one with Organization: F&B US Inc.
3. Navigate to Exchange Rates tab.
4. Create a new one with Currency: USD To Currency: EUR Rate 20
5. Create a new one with Currency: USD To Currency: EUR Rate 50
6. An error should be displayed. The record is not saved

Test plan III (trigger):
1. Go to Financial account.
2. Create a new transaction (example GL Item type) with Organization: F&B US Inc.
3. Navigate to Exchange Rates tab.
4. Create a new one with Currency: USD To Currency: EUR Rate 20
5. Create a new one with Currency: USD To Currency: EUR Rate 50
6. An error should be displayed. The record is not saved

Test plan IV (build validation):
1. Before applying the fix, go to Payment In.
2. Create a new one with Organization: F&B US Inc.
3. Navigate to Exchange Rates tab.
4. Create a new one with Currency: USD To Currency: EUR Rate 20
5. Create a new one with Currency: USD To Currency: EUR Rate 50
6. Apply the fix (that includes the build validation)
7. Run ant smartbuild -Dlocal=no
8. The compilation should fail
9. Go to the application, as client admin role
10. A new alert is created
11. Browse to the wrong Payment In and delete one of the records inside the Exchange Rates tab
12. Run ant smartbuild -Dlocal=no again
13. The compilation should go fine



Note: Repeat all the tests in both Oracle and Postgres
(0048633)
hgbot   
2012-05-14 19:03   
Repository: erp/devel/pi
Changeset: 47bed64aeb30a1220188509886091407b148e309
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Wed May 09 12:42:17 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/47bed64aeb30a1220188509886091407b148e309 [^]

Fixes issue 20142: Duplicate Exchange Rates in Exchange Rate tab

---
A src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRate.class
A src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRateData.class
A src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate.java
A src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate_data.xsql
---
(0048634)
hgbot   
2012-05-14 19:03   
Repository: erp/devel/pi
Changeset: 376f55b24a77857a0ac397aaadc2f180de896588
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Mon May 14 13:20:41 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/376f55b24a77857a0ac397aaadc2f180de896588 [^]

Related to issue 20142: C_CONVERSION_RATE_DOC_TRG2 trigger

---
M src-db/database/sourcedata/AD_MESSAGE.xml
A src-db/database/model/triggers/C_CONVERSION_RATE_DOC_TRG2.xml
---
(0048635)
vmromanos   
2012-05-14 19:03   
Code review + testing OK
(0048704)
hgbot   
2012-05-16 16:53   
Repository: erp/devel/pi
Changeset: 98e1448a4505ca042da27e85fb4ab3c2c8b9bfb5
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Wed May 16 16:51:48 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/98e1448a4505ca042da27e85fb4ab3c2c8b9bfb5 [^]

Related to issue 20142: create alert with NEW status

---
M src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRateData.class
M src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate_data.xsql
---
(0048713)
hgbot   
2012-05-16 19:02   
Repository: erp/devel/pi
Changeset: 90cdb77c016b57b8c27e62ccaabce8aa3848df62
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Wed May 16 18:07:34 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/90cdb77c016b57b8c27e62ccaabce8aa3848df62 [^]

Related to issue 20142: do not use status column in ad_alert.
Status column in ad_alert table does not exist on 2.50.

---
M src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRateData.class
M src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate_data.xsql
---
(0049123)
hudsonbot   
2012-05-25 12:12   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test
(0049124)
hudsonbot   
2012-05-25 12:12   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test
(0049146)
hudsonbot   
2012-05-25 12:12   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test
(0049152)
hudsonbot   
2012-05-25 12:12   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test