Stock wizard_partial_picking Average price computation doesn't work as expected
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) | Status tracked in Trunk | |||||
5.0 |
Fix Released
|
Medium
|
JMA(Open ERP) | |||
Trunk |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 2 |
Bug Description
In the wizard_
new_std_price = ((product.
I've a product with a standard_price of 1500 and an available qty of 2, now i purchase 2 additional product with a unit price of 1000:
if ive one move_line with qty:2 price 1000 the calculation works fine:
((1500 * 2) + (1000 * 2)) / (2 + 2) = 1250
but if i split the the line in 2 lines each with a qty of 1 and a price of 1000 the product_
((1500 * 2) + (1000 * 1)) / (2 + 1) = 1333,33
after calculating the new cost_price for the first line the new price is written in the product but the qty_available doesnt change
as the workflow action that ends the move is called later in the method.
((1333,33 * 2) + (1000 * 1)) / (2 + 1) = 1222,22
This average price is wrong, the right one would take the additional qty of the first line in count :
((1333,33 * 3) + (1000 * 1)) / (2 + 1) = 1250
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 847 lines (+137/-98)39 files modifiedaccount/report/account_balance.py (+2/-0)
account/wizard/account_automatic_reconcile.py (+4/-1)
account/wizard/account_change_currency.py (+3/-3)
account/wizard/account_chart.py (+7/-7)
account/wizard/account_fiscalyear_close.py (+4/-1)
account/wizard/account_fiscalyear_close_state.py (+3/-3)
account/wizard/account_invoice_refund.py (+5/-1)
account/wizard/account_move_bank_reconcile.py (+4/-4)
account/wizard/account_move_journal.py (+1/-1)
account/wizard/account_move_line_reconcile_select.py (+3/-3)
account/wizard/account_move_line_unreconcile_select.py (+3/-3)
account/wizard/account_open_closed_fiscalyear.py (+2/-0)
account/wizard/account_reconcile.py (+8/-8)
account/wizard/account_report_balance_sheet.py (+2/-1)
account/wizard/account_report_common.py (+4/-1)
account/wizard/account_report_general_ledger.py (+1/-1)
account/wizard/account_report_partner_balance.py (+1/-1)
account/wizard/account_report_partner_ledger.py (+1/-1)
account/wizard/account_report_profit_loss.py (+1/-1)
account/wizard/account_tax_chart.py (+9/-9)
account/wizard/account_validate_account_move.py (+3/-0)
account/wizard/account_vat.py (+3/-0)
account_analytic_plans/wizard/account_crossovered_analytic.py (+3/-1)
account_coda/wizard/account_coda_import.py (+10/-10)
account_followup/wizard/account_followup_print.py (+2/-2)
account_invoice_layout/report/special_message_invoice.py (+4/-1)
auction/wizard/auction_lots_invoice.py (+2/-2)
hr_recruitment/wizard/hr_recruitment_phonecall.py (+5/-5)
hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py (+9/-9)
lunch/wizard/lunch_order_confirm.py (+2/-2)
point_of_sale/wizard/pos_payment.py (+3/-0)
point_of_sale/wizard/pos_return.py (+2/-2)
product/wizard/product_price.py (+2/-0)
product_margin/product_margin_view.xml (+3/-0)
project/wizard/project_task_delegate.py (+2/-0)
project_gtd/wizard/project_gtd_fill.py (+3/-3)
project_long_term/wizard/project_compute_phases.py (+5/-5)
project_long_term/wizard/project_compute_tasks.py (+2/-2)
stock/wizard/stock_move.py (+4/-4)
- OpenERP Core Team: Pending requested
-
Diff: 238 lines (+35/-12)16 files modifiedaccount/report/account_balance.py (+2/-0)
account/wizard/account_move_journal.py (+1/-1)
account/wizard/account_open_closed_fiscalyear.py (+2/-0)
account/wizard/account_report_balance_sheet.py (+2/-1)
account/wizard/account_report_common.py (+4/-1)
account/wizard/account_report_general_ledger.py (+1/-1)
account/wizard/account_report_partner_balance.py (+1/-1)
account/wizard/account_report_partner_ledger.py (+1/-1)
account/wizard/account_report_profit_loss.py (+1/-1)
account/wizard/account_validate_account_move.py (+3/-0)
account/wizard/account_vat.py (+3/-0)
auction/wizard/auction_lots_invoice.py (+2/-2)
mrp/mrp.py (+2/-1)
product/pricelist.py (+1/-1)
stock/stock.py (+8/-0)
stock/wizard/stock_invoice_onshipping.py (+1/-1)
affects: | openobject-server → openobject-addons |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
tags: | added: maintenance |
summary: |
- Stock wizard_partial_picking Average price computation doesnt work as - expectet + Stock wizard_partial_picking Average price computation doesn't work as + expected |
tags: | added: average-price partial-delivery |
Hello,
I have tested your scenario with the latest code of trunk version. Fortunately it works fine at my end. I have attached the screen shots for your reference. So please check it and notify me if i did wrong steps for reproducing it.
Thanks.