Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012605Openbravo ERP04. Warehouse managementpublic2010-03-09 12:312012-04-26 19:32
xabiermerino 
naiaramartinez 
highminoralways
closedfixed 
5
pi 
3.0MP11 
Core
No
0012605: Minor issue in 'Generate Average Costs' price choosing
Minor issue in 'Generate Average Costs' price choosing

Tested in http://live.builds.openbravo.com/erp_devel_pi-full-oracle/ [^]
Process 'Generate Average Costs'
https://code.openbravo.com/erp/devel/pi/file/tip/src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml [^]
1) Create a new Purchase Price List
2) Create a new purchase price list version valid from date 23-03-2010
3) Create a product price for product Hammer (all to 25.00)
4) Navigate to product Hammer then to tab Price and de-activate product price record
for Price List Version Purchase 2006
5) Create a goods receipt with movement date 23-03-2010
6) Add a line for product Hammer.
7) Navigate back to the header and complete it.
8) Click on Generate Average Costs process.
9) Navigate to product Hammer then to tab Costing.
10) A record for the goods receipt movement has been created with the product price
of the Price List Version Purchase 2006 even this record has been de-activated for
the product Hammer (minor issue).
11) Navigate to the Price List Version Purchase 2006 and de-activate it.
12) Click on Generate Average Costs process.
13) You get a warning message saying that cost could not be calculated (since price
not found): this is correct.
14) Navigate to the business partner of the goods receipt and in Vendor tab select
the new Purchase Price List created.
15) Click on Generate Average Costs process.
16) You get a warning message saying that cost could not be calculated (since price
not found): this is NOT correct since the price list version is valid for the same
date as the movement date (23-03-2010) but is not taken into account (minor issue).
For both minor issues have a look at these lines
https://code.openbravo.com/erp/devel/pi/file/tip/src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml#l214 [^]
* Is missing AND M_PRODUCTPRICE.ISACTIVE='Y'
* Have to replace AND M_PRICELIST_VERSION.VALIDFROM<Cur_InOutLine.MOVEMENTDATE by AND
M_PRICELIST_VERSION.VALIDFROM<=Cur_InOutLine.MOVEMENTDATE
VMA-Reviewed
Issue History
2010-03-09 12:31xabiermerinoNew Issue
2010-03-09 12:31xabiermerinoAssigned To => adrianromero
2011-06-03 11:00dalsasuaAssigned Toadrianromero => dalsasua
2011-07-20 18:11dalsasuaAssigned Todalsasua => jonalegriaesarte
2012-04-03 12:20jonalegriaesarteAssigned Tojonalegriaesarte => vmromanos
2012-04-10 13:39vmromanosTag Attached: VMA-Reviewed
2012-04-16 13:09naiaramartinezAssigned Tovmromanos => naiaramartinez
2012-04-16 13:10naiaramartinezStatusnew => scheduled
2012-04-16 13:10naiaramartinezfix_in_branch => pi
2012-04-16 13:21naiaramartinezNote Added: 0047584
2012-04-24 13:10hgbotCheckin
2012-04-24 13:10hgbotNote Added: 0047910
2012-04-24 13:10hgbotStatusscheduled => resolved
2012-04-24 13:10hgbotResolutionopen => fixed
2012-04-24 13:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/da699739d61dd0980bc84ca06d86abdd399a38dc [^]
2012-04-24 13:19miruritaNote Added: 0047912
2012-04-24 13:19miruritaStatusresolved => closed
2012-04-24 13:19miruritaFixed in Version => 3.0MP11
2012-04-26 19:32hudsonbotCheckin
2012-04-26 19:32hudsonbotNote Added: 0048078

Notes
(0047584)
naiaramartinez   
2012-04-16 13:21   
Test Plan:
  Login as System administrator.
   Go to 'windows, tabs and fields'
   Select the record with 'Product' as name
   Select the record in tab with Price as name.
   Select 'Active' field and check the display field in order to do visible.
  
  Login as F&B International Group admin.
   Create a new Purchase Price List
   Create a new purchase price list version valid from date 16-04-2012
   Create a product price for product Ale Beer (all to 25.00)
   Navigate to product Ale Beer then to tab Price and de-activate product price record for General Sales and Happy Deinks Price List.
   Create a goods receipt with movement date 16-04-2012
   Add a line for product Ale Beer.
   Navigate to the business partner of the goods receipt and in Vendor tab select the new Purchase Price List created.
   Navigate back to the header og the goods receipt and complete it.
   Click on Generate Average Costs process.
   Navigate to product Ale Beer then to tab Costing.
   A record for the goods receipt movement has been created with the product price of the created Price List.
(0047910)
hgbot   
2012-04-24 13:10   
Repository: erp/devel/pi
Changeset: da699739d61dd0980bc84ca06d86abdd399a38dc
Author: Naiara Martinez <naiara.martinez <at> openbravo.com>
Date: Thu Apr 19 18:21:17 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/da699739d61dd0980bc84ca06d86abdd399a38dc [^]

fixed bug 12605 In M_GENERATE_AVERAGE_COST add isactive and date validations
M_PRODUCTPRICE.ISACTIVE='Y' and
M_PRICELIST_VERSION.VALIDFROM<Cur_InOutLine.MOVEMENTDATE+1

---
M src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
---
(0047912)
mirurita   
2012-04-24 13:19   
code review + testing OK
(0048078)
hudsonbot   
2012-04-26 19:32   
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/70a717a9ffa1 [^]

Maturity status: Test