Openbravo Issue Tracking System - Modules
View Issue Details
0028778ModulesService Contract Managementpublic2015-01-27 11:542015-01-27 15:47
vmromanos 
vmromanos 
normalmajoralways
closedfixed 
20Debian 5.0
 
 
Sandrahuguet
0028778: c_currency_id is empty when saving a new contract
The c_currency_id column is empty when saving a contract, however this column is mandatory so an error is raised and the contract can't be saved
Install the last available version of service contract management template
Go to contract type and create a new record. Sales Contract=Y
Go to Contract Invoice Schedule and create a new record
Go to contract. Select the previous contract type and contract invoice schedule, fill the rest of the fields and save the contract. An error is shown and the contract can't be saved
No tags attached.
caused by design defect 0028782 acknowledged AugustoMauch Openbravo ERP Column's default value doesn't work when the column doesn't have an associated field in a tab 
blocks defect 0028575 closed vmromanos Modules Wrong text in Reactivate button and Reactivate should not be appear in Contract window in one specific case 
Issue History
2015-01-27 11:54vmromanosNew Issue
2015-01-27 11:54vmromanosAssigned To => vmromanos
2015-01-27 11:54vmromanosStatusnew => scheduled
2015-01-27 11:54vmromanosfix_in_branch => pi
2015-01-27 11:55vmromanosRelationship addedblocks 0028575
2015-01-27 12:30hgbotCheckin
2015-01-27 12:30hgbotNote Added: 0073805
2015-01-27 12:30hgbotStatusscheduled => resolved
2015-01-27 12:30hgbotResolutionopen => fixed
2015-01-27 12:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/8b52d8035c9e213724f905b1999d63e4212eb5df [^]
2015-01-27 13:16vmromanosRelationship addedcaused by 0028782
2015-01-27 14:44hgbotCheckin
2015-01-27 14:44hgbotNote Added: 0073812
2015-01-27 14:44hgbotCheckin
2015-01-27 14:44hgbotNote Added: 0073813
2015-01-27 14:44hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/8b52d8035c9e213724f905b1999d63e4212eb5df [^] => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/0d73225eb0a374ee13a2811c2408d9a9b29f06c3 [^]
2015-01-27 14:51vmromanosNote Added: 0073814
2015-01-27 15:47SandrahuguetReview Assigned To => Sandrahuguet
2015-01-27 15:47SandrahuguetNote Added: 0073819
2015-01-27 15:47SandrahuguetStatusresolved => closed

Notes
(0073805)
hgbot   
2015-01-27 12:30   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: 8b52d8035c9e213724f905b1999d63e4212eb5df
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Jan 27 12:28:04 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/8b52d8035c9e213724f905b1999d63e4212eb5df [^]

Fixed bug 28778: Added currency field to contract's status bar

We have detected that, when a field is not available into the tab, the default value is not working. The workaround is to create that field.

Besides, we have transplanted the improvements on SE_PriceListChange.java from the spm branch, so the Currency field is updated whenever the Price list is changed

---
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/contract/services/callout/SE_PriceListChange.java
---
(0073812)
hgbot   
2015-01-27 14:44   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: 3c10acef739adf703e84638c740719a32693b596
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Jan 27 13:46:12 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/3c10acef739adf703e84638c740719a32693b596 [^]

Related to issue 28778: Backed out changeset 8b52d8035c9.e

The currency field is moved to the infrastructure module instead

---
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/contract/services/callout/SE_PriceListChange.java
---
(0073813)
hgbot   
2015-01-27 14:44   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: 0d73225eb0a374ee13a2811c2408d9a9b29f06c3
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Jan 27 14:43:23 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/0d73225eb0a374ee13a2811c2408d9a9b29f06c3 [^]

Fixed bug 28778: Transplanted the improvements on SE_PriceListChange.java from the spm branch,
so the Currency field is updated whenever the Price list is changed

---
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MODULE.xml
M src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
M src/org/openbravo/contract/services/callout/SE_PriceListChange.java
---
(0073814)
vmromanos   
2015-01-27 14:51   
Explanation of the fix:

The org.openbravo.contract 1.1.4 now includes a hidden currency field in contract tab.
In versions before 1.1.3, this module contained a hidden currency field, but in 1.1.3 (which was published in test status) this field was removed, that's why this issue is reproducible.
Setting back the currency field is a workaround for 0028782.

Apart from that, the SE_PriceListChange.java callout in org.openbravo.contract.services has been improved to manage the contract's currency each time the contract's price list is changed.
Note that the currency field is hidden (because this value is not used by contract modules), but this way we ensure we have consistent data in the database.

In this case, no module script is needed because, as explained before, the C_project.c_currency_id column is not used by contract functionality.
(0073819)
Sandrahuguet   
2015-01-27 15:47   
Verified