Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2014-12-17 18:172014-12-30 23:28
ReporterumartirenaView Statuspublic 
Assigned Todmiguelez 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision17adffe3f2cd
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0028441: [Costing] Validate Costing Rule fails if there are no previous Costing Rules and exists transactions of a date before

Description[Costing] Validate Costing Rule process fails when is the first Costing Rule to be validated and there are transactions dated on a date before the starting date of the Costing Rule.

This is the error triggered by the process:
ERROR: null value in column "dateacct" violates not-null constraint"
Steps To ReproduceCreate a new Organization (Legal Entity With Accounting).

Setup the vary basics such as fiscal calendar, open/close periods, BP group, Product group, Price Schema, Price list, a BP and a product. This setup should allow you to create and book a purchase order, a goods receipt of that order and the corresponding purchase invoice.

Go to Goods receipt and create a new one for the new org dated on 01/12/2014. Complete it.

Go to Costing rule and create a new one by entering below data:
* Starting Date: 15/12/2014.
Click on "Validate Costing Rule".

Realize that the error described above is displayed.
Proposed SolutionIn there are two places in where TransactionCost records are being created. The accounting date is mandatory for this table and is not being setted. Assign a value to that column.

The two places are:
* initializeOldTrx
* updateInventoriesCostAndProcessInitInventories

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
hgbot (developer)
2014-12-17 18:35

Repository: erp/devel/pi
Changeset: 17adffe3f2cda34ce68a0c45b8fb5a7fc959afe1
Author: Unai Martirena <unai.martirena <at>>
Date: Wed Dec 17 18:33:43 2014 +0100
URL: [^]

Fixes Bug 28441:Validate Costing Rule doesn't fail if there prev transactions.

The process was failing while trying to create Transaction Cost records in initializeOldTrx and updateInventoriesCostAndProcessInitInventories processes. It was not setting any value to accounting date column, which is mandatory. This column has been populated in the following way: If the related transaction is a shipment the accounting date of the shipment is assigned, if not, the movement date of the transaction will be assigned.

M src/org/openbravo/costing/
umartirena (developer)
2014-12-17 18:56

The column dateacct in m_transaction_cost was made mandatory in Cost Adjustment project.
psanjuan (manager)
2014-12-18 16:27

aferraz (developer)
2014-12-18 17:05

Code review done.
hudsonbot (developer)
2014-12-30 23:28

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-12-17 18:17 umartirena New Issue
2014-12-17 18:17 umartirena Assigned To => dmiguelez
2014-12-17 18:17 umartirena Modules => Core
2014-12-17 18:17 umartirena Triggers an Emergency Pack => No
2014-12-17 18:35 hgbot Checkin
2014-12-17 18:35 hgbot Note Added: 0072669
2014-12-17 18:35 hgbot Status new => resolved
2014-12-17 18:35 hgbot Resolution open => fixed
2014-12-17 18:35 hgbot Fixed in SCM revision => [^]
2014-12-17 18:56 umartirena Note Added: 0072671
2014-12-18 16:27 psanjuan Note Added: 0072703
2014-12-18 17:05 aferraz Note Added: 0072705
2014-12-18 17:06 aferraz Review Assigned To => aferraz
2014-12-18 17:06 aferraz Status resolved => closed
2014-12-30 23:28 hudsonbot Checkin
2014-12-30 23:28 hudsonbot Note Added: 0073239

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker