Tryton - Issues

 

Issue7273

Title Conflict between wizards "wizard_recompute_cost_price" and "wizard_update_cost_price"
Priority bug Status resolved
Superseder Keep history of cost price modification
View: 8930
Nosy List ced, mrichez, reviewbot, roundup-bot, tbruyere
Type behavior Components account_stock_continental
Assigned To ced Keywords review
Reviews 262541002
View: 262541002

Created on 2018-03-27.16:11:29 by tbruyere, last changed by roundup-bot.

Messages
New changeset 890275c79464 by Cédric Krier in branch 'default':
Use only 3 stock accounts
https://hg.tryton.org/tryton-env/rev/890275c79464
New changeset 4a654af45cbe by Cédric Krier in branch 'default':
Use only 3 stock accounts
https://hg.tryton.org/modules/purchase_shipment_cost/rev/4a654af45cbe
New changeset 5edcf9732d0d by Cédric Krier in branch 'default':
Use only 3 stock accounts
https://hg.tryton.org/modules/account_stock_continental/rev/5edcf9732d0d
New changeset df7cddd187d8 by Cédric Krier in branch 'default':
Use only 3 stock accounts
https://hg.tryton.org/modules/account_stock_anglo_saxon/rev/df7cddd187d8
review262541002 updated at https://codereview.tryton.org/262541002/#ps258491002
review262541002 updated at https://codereview.tryton.org/262541002/#ps252671003
msg53435 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-22.19:28:11
Here is review262541002 which simplifies the number of account.
msg43709 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-06.08:37:27
Also I think the wizard when run on multiple product should just ignore the "manual cost" products. And when run on a single product which is a "manual cost" product, it ask for the new cost.
msg43707 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-06.00:38:24
So to be able to have a single wizard, we need to stop requesting stock account for the move. For that, I think we should simplify the account_stock* fields. I think we should have only:

- account_stock
- account_stock_in
- account_stock_out

For me, it is enough so in this case we can create the accounting move automatically without asking anything to the user.
msg39473 (view) Author: [hidden] (tbruyere) Date: 2018-03-28.09:31:35
> Or maybe it is simpler to forbid to use update wizard if the method is average
With the average cost method, it must be possible to perform a manual price change 
because we can imagine the need to integrate additional costs on a product 
but that we can not impact a delivery.

Example:
We have received different delivery, so we have 1000 products in stock.
Due to a storage problem, we must apply a treatment on these products before being able 
to sell them (for example cleaning). We must impact these costs in the cost price and in the stock account. 
For this we recalculate a new cost price manually and we use the wizard to apply this difference. 
We can not use the notion of "landed cost" in this case, 
because the costs must be impacted on all the stock and not on a delivery.


I think merging both wizard will be the solution.
msg39472 (view) Author: [hidden] (tbruyere) Date: 2018-03-28.09:17:02
If we link the topic "https://discuss.tryton.org/t/how-to-add-amount-to-account-stock-if-we-add-a-landed-cost-to-a-supplier-shipment" 
it is necessary to integrate an imputation in the stock account
of the change of cost after recalculation in the assistant of update of the cost price (value of product added in the stock account).

Example : 
Current product cost price : 1,5€
Recompute product cost price : 2€ (landing cost integration)
Product cost price difference : 0,5€ 
Value to be posted to the stock account via the counterpart account: 0,5 € * Qty in stock

Currently the wizard "update_cost_price" only ask the new cost price but 
does not take the current cost price to compare it to the cost price calculated by the method "recompute"
msg39458 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-27.16:49:52
This is not a solution.
The cost price change should be stored in such way that the re-compute will reuse the information at the right time.
But on another side, I'm wondering if both wizard should not merge in such way that if the method if average, the only value allowed is this result for the update of the cost price. Or maybe it is simpler to forbid to use update wizard if the method is average and that the recompute wizard run the update wizard to make the update.
msg39453 (view) Author: [hidden] (tbruyere) Date: 2018-03-27.16:11:29
The account_stock_continental module allows to update manually the cost price with the wizard wizard_update_cost_price.
But you can also call the "wizard_recompute_cost_price" after and that will erase the previous updated cost price.

Problem:
The account_stock_continental create account moves with difference between the recomputed cost price and the asked cost price (wizard). 
If you recompute the cost price after this, the account stock value is not correct.

Solution:
Forbid to use "wizard_recompute_cost_price" if there are no stock move since the "wizard_update_cost_price" execution.
History
Date User Action Args
2020-01-08 14:37:21roundup-botsetmessages: + msg54759
2020-01-08 14:37:16roundup-botsetmessages: + msg54758
2020-01-08 14:37:08roundup-botsetmessages: + msg54757
2020-01-08 14:37:03roundup-botsetstatus: in-progress -> resolved
nosy: + roundup-bot
messages: + msg54756
2020-01-08 14:36:02cedsetsuperseder: + Keep history of cost price modification
2019-12-16 17:10:19cedlinkissue8930 superseder
2019-11-30 23:11:14reviewbotsetmessages: + msg53768
2019-11-22 19:41:51reviewbotsetnosy: + reviewbot
messages: + msg53438
2019-11-22 19:28:12cedsetstatus: chatting -> in-progress
reviews: 262541002
messages: + msg53435
keyword: + review
assignedto: ced
2018-09-06 08:37:27cedsetmessages: + msg43709

Showing 10 items. Show all history (warning: this could be VERY long)