Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC][14.0] (A) Manufacturing Materials Analytic Costs #569

Closed
dreispt opened this issue Dec 10, 2020 · 7 comments
Closed

[RFC][14.0] (A) Manufacturing Materials Analytic Costs #569

dreispt opened this issue Dec 10, 2020 · 7 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@dreispt
Copy link
Sponsor Member

dreispt commented Dec 10, 2020

Description

Manufacturing costs are only generated when a Manufacturing Order is closed.

This feature allows to track costs while the manufacturing is in progress.
This is done for raw materials used, by generating Analytic Items when the stock is reserved.

Usage

To use:

  • On the Manufacturing Order, set the Analytic Account to use. This may correspond to a Project.
  • On Manufacturing Orders, when a stock reservation is triggered, Analytic Items are automatically generated .

To analyze costs:

  • Go to Manufacturing > Reports > Analytic Items. The cost data is available there and can be used for analysis.
  • At Project > Dashboard, "Project Overview" form, a summary of the costs for the corresponding Analytic Account is presented.

Tech design

New module mrp_analytic_cost_material, "Track raw material costs as Analytic Items during the manufacturing process".
Depends on core mrp and mrp_analytic from https://github.com/OCA/account-analytic
Maturity: Alpha (this is a PoC, and only a piece for a larger puzzle)

Migrate mrp_analytic to 14.0:

As is a required dependency.
Reference: OCA/account-analytic#275

Analytic Item (account.analytic.line)

Add fields:

  • "Related Stock Move" stock_move_id field, stores the related Stock Move, generated on stock reservation for an MO.
  • "Related Manufacturing Order" manufacturing_order_id (mrp.production).
  • "Project Category", related to product_id.category_id, stored.

Add Views:

  • Search Filter: add filter "Related to MO"
  • Search View add group by Manufacturing Order, group by Product Category
  • Menu "Manufacturing > Reports > Analytic Items": opens existing Analytic Items views, with "Related to MO" filter enabled.

Stock Move

When stock is reserved for an MO On a button click, run a process to generate an Analytic Item for the materials cost, including:

  • Analytic Account
  • Related Stock Move
  • Related MO
  • Product
  • Quantity
  • Cost * -1 (should be a negative amount)

If the stock is unreserved, delete the corresponding Analytic Item.

@dreispt
Copy link
Sponsor Member Author

dreispt commented Dec 10, 2020

mrp_analytic migration has been done: OCA/account-analytic#343

@agyamuta
Copy link

@dreispt comment on this design.

On Manufacturing Orders, when a stock reservation is triggered, Analytic Items are automatically generated .
-> We also have to consider though odoo initially picked the inventory based on it's removal strategy. What happens if user
picked another inventory from the available quant? Should we cancel prior Analytic Entry and create a new one?

@dreispt
Copy link
Sponsor Member Author

dreispt commented Dec 10, 2020

@agyamuta At this point we are want to use whatever is the standard cost for the Product. It would be good to have this logic in its own method, so that other cases can be added later.

@bunhin
Copy link

bunhin commented Mar 4, 2021

I agree to have other option in manufacturing to consume the raw material while it is not done, considering when the production time is quite long, the need is:

  1. there is no staright wip accumulated in an MO (yes we can manually consume to a location but it is not registered in an MO)
  2. The raw material quantity information is not accurate (because the raw material already processed into other form as process is going) -- can mis leading on planning as well
  3. For use case of live-stock production such as a breeder company, a poultry ---> we consume everyday for the food medicine or anything to grow the asset, when the time come (done) we convert the asset in progress into an asset and start the depreciation (usecase example with day old chicc (DOC) breeder, usually the grow the parent animal from DOC for about 6 months time (all consumed material and expenses to be entered in "live-stock asset in progress" account, when those parent animal start to produce EGG, (production parent is done), then all become live asset, and depreciation start to account for cost of egg to produce DOC (chick) for sell.
  4. will be good if we have a feature to cover that kind of process

@Ahmed-Saad225
Copy link

is there any odoo 13 version??

@dreispt
Copy link
Sponsor Member Author

dreispt commented Jul 3, 2021

@bunhin I feel that this module probably has all you need for that, you just need to setup the proper accounts.

@Ahmed-Saad225 No. And before it is ported, there is a refactor to do: I'm proposing here two separate modules for my use case, and I want to merge them into one, since I found the module split to introduce unneeded complexity.

@github-actions
Copy link

github-actions bot commented May 1, 2022

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 1, 2022
@github-actions github-actions bot closed this as completed Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

4 participants