Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0011336
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 08. Project and service managementmajoralways2009-11-12 13:572010-01-20 23:26
ReportergorkaionView Statuspublic 
Assigned Torafaroda 
PriorityurgentResolutionfixedFixed in Version2.50MP11
StatusclosedFix in branchpiFixed in SCM revision27eafa5b97c2
ProjectionnoneETAnoneTarget Version2.50MP11
OSLinux 32 bitDatabaseOracleJava version1.5.0_15
OS VersionGentooDatabase version11gAnt version1.7.0
Product Version2.50MP1SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0011336: 'Create Sales Orders from Expenses' process assumes that it will always find a price

DescriptionThe process 'Create Sales Orders from Expenses' in 'Project & Service Management || Transactions' assumes that it will always find a price.

This process generates sales orders to re-invoice employee expenses to customers. To set the price on each line it uses first the invoice price that can be set in the expense line. If this is null it searches for the price in the price list used in the order (the price list assigned to the customer).

If the customer's price list doesn't include the product the process continues using the price of the previous processed line.
Steps To ReproduceGo to 'Project & Service Management || Transactions || Expense Sheet'

Create a new Expense Sheet.
Create a new line:
-line no 10.
-reinvoicing checked
-time sheet unchecked
-qty 10
-invoice price: 10
-product anyone
-project anyone
-Business partner anyone (but not null)

Create a second line with the same values than the previous one, but this time left the invoice price null and a different product.

Ensure that the selected partner's sales prices list doesn't include the product used in the second line.

Process the Expense Sheet.

Go to 'Create Sales Orders from Expenses' and generate the sale order for the used business partner.

Go to the generated sales order and notice that the line corresponding to the second expense sheet line has the price of the previous line.

The process should have stopped on error asking to set a price for the product in the expense sheet line or on the customers price list.
Proposed SolutionAdd a validation in the org.openbravo.erpCommon.ad_actionButton.ExpenseSOrder java class when the prices are calculated. If the selectPrice method doesn't return any price raise an error which message should ask to set a price in the corresponding Expense Sheet line or in the corresponding customers price list.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0010431 closedrafaroda UOM is not properly updated in expense sheet lines. 
related to defect 00112422.50MP11 closedrafaroda in time sheet, can not select business partner if project don't have associated it 
related to defect 0011980 closedrafaroda Avoid inconsistent data in expense sheet lines. 

-  Notes
(0022881)
hgbot (developer)
2009-12-16 18:52

Repository: erp/devel/pi
Changeset: c1bfea42963bd856be7d16ff9c194dfe77188bd9
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Wed Dec 16 18:34:02 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c1bfea42963bd856be7d16ff9c194dfe77188bd9 [^]

Fixes issue 11336 Message displayed when no price found in Create Sales Orders From Expenses process.

---
M src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
M src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder_data.xsql
---
(0022909)
sureshbabu (reporter)
2009-12-17 10:50

Tested working fine
(0022933)
hgbot (developer)
2009-12-18 12:06

Repository: erp/devel/pi
Changeset: 31009eb3311533dbe8998bbea79ba90800f30939
Author: Juan Pablo Aroztegi <juanpablo.aroztegi <at> openbravo.com>
Date: Fri Dec 18 12:04:05 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/31009eb3311533dbe8998bbea79ba90800f30939 [^]

Backed out changeset c1bfea42963b. Issue 11336.

---
M src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
M src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder_data.xsql
---
(0022934)
rafaroda (developer)
2009-12-18 12:20

Re-opened issue due to smoke test fail. Pending to be discussed with QA.
(0022949)
hudsonbot (developer)
2009-12-19 00:36

---
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/c1bfea42963b [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/867059305a34 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15773.obx [^]
---
(0022961)
hudsonbot (developer)
2009-12-19 00:36

---
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/31009eb33115 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/867059305a34 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15773.obx [^]
---
(0023455)
hgbot (developer)
2010-01-14 19:46

Repository: erp/devel/pi
Changeset: 27eafa5b97c2bbf44a3e3c9ed9f0db809901844d
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Thu Jan 14 04:49:31 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/27eafa5b97c2bbf44a3e3c9ed9f0db809901844d [^]

Fixes issue 11336 Refactored 'Create Sales Orders from Expenses' process.

* Fixed the price calculation.
* Created methods for sales order header and lines creation.
* Refactored message handling to get more meaningful messages.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
M src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder_data.xsql
---
(0023456)
rafaroda (developer)
2010-01-14 19:48

Steps to test the fix:
1) Create a new Product in Master Data Management || Product
* Name = My Expense
* Product Type = Expense Type
* UOM = Minutes
2) Create a new expense sheet for Employee John Moneymaker in Project & Service Management || Transactions || Expense Sheet || Header
3) Navigate to Lines and create a new record:
* Reinvoicing = Yes
* Product = MyExpense
* UOM = Minutes
* Invoice Price = null (notice that MyExpense is not in a price list)
* Business Partner = Millman
* Project = Consulting Project
4) Create a new record:
* Reinvoicing = Yes
* Product = Electricity
* UOM = KWh
* Invoice Price = 18 (notice that Electricity is not in a price list)
* Business Partner = Millman
* Project = Millman Project
5) Navigate back to the expense sheet header and process it.
6) Create a new expense sheet for Employee John Moneymaker in Project & Service Management || Transactions || Expense Sheet || Header
7) Navigate to Lines and create a new record:
* Reinvoicing = Yes
* Product = Food
* UOM = Unit
* Invoice Price = null (notice that Food is in the business partner sales price list)
* Business Partner = Millman
* Project = Consulting Project
8) Create a new record:
* Reinvoicing = Yes
* Product = MyExpense
* UOM = Minutes
* Invoice Price = null (notice that MyExpense is not in a price list)
* Business Partner = Millman
* Project = Millman Project
9) Navigate back to the expense sheet header and process it.
10) Navigate to Project & Service Management || Transactions || Create Sales Orders from Expenses:
* Customer = Millman
* Date Ordered = 01-01-2010
11) Click on Process and you will get the error message:
"Expense Sheet No. xxx, Line yyy: Price not found for current partner and product."
12) Navigate to the expense Sheet of the error message and unprocess it.
13) Navigate to Lines and add an Invoice Price = 8 to the line stated in the error message (should correspond to product My Expense).
14) Navigate back to the header and process it.
15) Navigate to Project & Service Management || Transactions || Create Sales Orders from Expenses:
* Customer = Millman
* Date Ordered = 01-01-2010
16) Click on Process and you will get the error message (only one sales order has been created):
"Created: 1
Sales Order No. eeeeee has been created -> Shipment No. ddddddd has been created
Expense Sheet No. zzz, Line aaa: Price not found for current partner and product."
17) Navigate to Product MyExpense.
18) Navigate to tab Price and create a new record:
* Price List version = Sales 2006
* List Price = 7
* Standard Price = 6
* Price Limit = 5
19) Navigate back to to Project & Service Management || Transactions || Create Sales Orders from Expenses:
* Customer = Millman
* Date Ordered = 01-01-2010
* Untick "Complete and Process Sales Orders automatically" check-box (do not select it).
20) Click on Process and you will get the success message:
"Created: 1
Sales Order No. iiiiiiiii has been created".
21) Navigate to the 2 sales order created and in its lines check that:
* Sales Order 1 completed and 2 products.
* Sales Order 2 NOT completed and 2 products.
(0023485)
arunkumar (reporter)
2010-01-18 08:58

Rafa I followed the steps you have given to test the fix.

I was doing the steps:

10) Navigate to Project & Service Management || Transactions || Create Sales Orders from Expenses:
* Customer = Millman
* Date Ordered = 18-01-2010
11) Click on Process and you will get the error message:

I have got the error message
Error:
Created: 0
Expense Sheet No. 10000014, line 20: Could not find taxes.

This Expense sheet refers to the product Electricity which I have added in the lines of the first expense sheet.

Can you please tell me what is the issue here?
(0023609)
arunkumar (reporter)
2010-01-20 12:49

Tested & Working fine.
(0023652)
hudsonbot (developer)
2010-01-20 23:26

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/27eafa5b97c2 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]

- Issue History
Date Modified Username Field Change
2009-11-12 13:57 gorkaion New Issue
2009-11-12 13:57 gorkaion Assigned To => rafaroda
2009-11-13 10:25 rafaroda Priority immediate => urgent
2009-11-13 10:25 rafaroda Status new => scheduled
2009-11-13 10:25 rafaroda version => 2.50MP1
2009-12-16 10:12 rafaroda Relationship added related to 0010431
2009-12-16 10:13 rafaroda Relationship added related to 0011242
2009-12-16 18:52 hgbot Checkin
2009-12-16 18:52 hgbot Note Added: 0022881
2009-12-16 18:52 hgbot Status scheduled => resolved
2009-12-16 18:52 hgbot Resolution open => fixed
2009-12-16 18:52 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c1bfea42963bd856be7d16ff9c194dfe77188bd9 [^]
2009-12-16 19:17 rafaroda Note Added: 0022883
2009-12-16 19:18 rafaroda Note Edited: 0022883
2009-12-17 10:50 sureshbabu Note Added: 0022909
2009-12-17 10:50 sureshbabu Status resolved => closed
2009-12-17 10:50 sureshbabu Fixed in Version => 2.50MP10
2009-12-18 00:00 anonymous sf_bug_id 0 => 2916567
2009-12-18 12:06 hgbot Checkin
2009-12-18 12:06 hgbot Note Added: 0022933
2009-12-18 12:06 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/c1bfea42963bd856be7d16ff9c194dfe77188bd9 [^] => http://code.openbravo.com/erp/devel/pi/rev/31009eb3311533dbe8998bbea79ba90800f30939 [^]
2009-12-18 12:20 rafaroda Note Added: 0022934
2009-12-18 12:20 rafaroda Status closed => new
2009-12-18 12:20 rafaroda Resolution fixed => open
2009-12-18 12:20 rafaroda Fixed in Version 2.50MP10 =>
2009-12-19 00:36 hudsonbot Checkin
2009-12-19 00:36 hudsonbot Note Added: 0022949
2009-12-19 00:36 hudsonbot Checkin
2009-12-19 00:36 hudsonbot Note Added: 0022961
2009-12-30 18:49 psarobe Status new => acknowledged
2010-01-13 11:23 rafaroda Status acknowledged => scheduled
2010-01-13 11:23 rafaroda fix_in_branch => pi
2010-01-14 19:46 hgbot Checkin
2010-01-14 19:46 hgbot Note Added: 0023455
2010-01-14 19:46 hgbot Status scheduled => resolved
2010-01-14 19:46 hgbot Resolution open => fixed
2010-01-14 19:46 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/31009eb3311533dbe8998bbea79ba90800f30939 [^] => http://code.openbravo.com/erp/devel/pi/rev/27eafa5b97c2bbf44a3e3c9ed9f0db809901844d [^]
2010-01-14 19:48 rafaroda Note Added: 0023456
2010-01-15 16:53 rafaroda Relationship added related to 0011980
2010-01-15 20:19 rafaroda Note Deleted: 0022883
2010-01-18 08:58 arunkumar Note Added: 0023485
2010-01-20 12:49 arunkumar Note Added: 0023609
2010-01-20 12:49 arunkumar Status resolved => closed
2010-01-20 12:49 arunkumar Fixed in Version => 2.50MP11
2010-01-20 23:26 hudsonbot Checkin
2010-01-20 23:26 hudsonbot Note Added: 0023652


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker