Tryton - Issues

 

Issue3209

Title Cost allocation for Production
Priority feature Status testing
Superseder Nosy List Airidas, ced, giedrius, pokoli, reviewbot
Type behavior Components production
Assigned To ced Keywords review
Reviews 288471002
View: 288471002

Created on 2013-05-07.23:03:55 by giedrius, last changed by reviewbot.

Messages
review288471002 updated at https://codereview.tryton.org/288471002/#ps288461007
review288471002 updated at https://codereview.tryton.org/288471002/#ps254591002
review288471002 updated at https://codereview.tryton.org/288471002/#ps276291002
msg53101 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-08.16:17:25
Here is review288471002 which always allocates the cost of production in such way that we can remove the constraint.
msg53084 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-07.17:47:19
I forgot the case if there is no BOM on the production.
Indeed there are standardized methods [1] to allocate cost to by-product.
So the new proposal is to allocate the cost based on the list price of each products (and ignore products without list price).

[1] https://www.accountingtools.com/articles/2017/5/14/by-product-costing-and-joint-product-costing
msg53082 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-07.17:06:27
I propose to add on the bom outputs a distribution factor of the cost.
So the production will be able to distribute the cost automatically.
This will allow to apply the same design as issue8795 to recompute the production cost after the production is done (with user intervention).
msg13364 (view) Author: [hidden] (giedrius) Date: 2013-05-09.14:25:30
To implement a simple allocation, I suggest to add these fields to BOM.output:

* Allocation type: Selection(['fixed', 'multiplier'])
* Cost price: Decimal, visible when type == 'fixed'
* Multiplier: Float, visible when type == 'multiplier'

Then for allocation type == 'multiplier', production.output.cost_price =
(production.cost - all_fixed) * ratio / BOM.output.quantity
Where all_fixed = sum(for all fixed outputs)
And ratio = BOM.output.multiplier / sum(for all BOM output multipliers)
msg13361 (view) Author: [hidden] (giedrius) Date: 2013-05-08.08:20:05
I see your point now. Yes, allocation for multiple outputs is not possible. I
was talking only about the production with a single output.

I agree, it is an additional feature.
msg13360 (view) Author: [hidden] (giedrius) Date: 2013-05-07.23:58:58
The same method like in Production.explode_bom, just only using input.cost_price
instead of input.product.cost_price.

In addition, the cost allocation could be splitted out from
Production.explode_bom into the new method and re-used twice. First time - in
(or after) Production.explode_bom, second - in Production.run()
msg13359 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-05-07.23:46:42
And how should the cost being allocated?
msg13358 (view) Author: [hidden] (giedrius) Date: 2013-05-07.23:36:49
For me it looks like more a bug than a feature. The user manually needs to
adjust outputs costs of *every* production with FIFO input(s).
msg13357 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-05-07.23:26:45
So I see nothing wrong here, you just would like to have a new feature:
automatic allocation of the cost.
msg13356 (view) Author: [hidden] (giedrius) Date: 2013-05-07.23:20:03
After production is "run", the cost price becomes correct, but it is not
transferred to production.outputs cost.
This results to the exception when trying to "done" the production: Production
"x" misses costs on some of its outputs.
msg13355 (view) Author: [hidden] (giedrius) Date: 2013-05-07.23:03:53
Production costs are wrongly calculated. It is a case when the FIFO cost method
is used for input products. It takes the cost of product instead of values of
actual stock moves used in production.
History
Date User Action Args
2019-11-08 18:30:03reviewbotsetmessages: + msg53105
2019-11-08 18:04:54reviewbotsetmessages: + msg53104
2019-11-08 16:36:53reviewbotsetnosy: + reviewbot
messages: + msg53102
2019-11-08 16:17:25cedsetstatus: in-progress -> testing
reviews: 288471002
messages: + msg53101
keyword: + review
2019-11-07 17:47:19cedsetmessages: + msg53084
2019-11-07 17:06:27cedsetmessages: + msg53082
2019-11-07 16:58:29cedsetstatus: chatting -> in-progress
assignedto: ced
2017-10-25 17:48:52pokolisetnosy: + pokoli
2017-06-10 00:21:33cedlinkissue4137 superseder
2013-08-06 10:46:42cedlinkissue3330 superseder

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