-
- Downloads
[IMP] mrp(_account): include byproduct cost share in BoM/MO
For improved cost analysis, byproducts can now have a "cost share" (out of 100%) indicated. This cost share will by multiplied by the total BoM cost (i.e. components + operations costs) and reflected in the stock valuation. The final product will also have the byproducts cost subtracted from its final stock valuation. This is of course only applies when costing methods are appropriate (i.e. non-standard price). Additionally, we can now "Compute Price from BoM" for byproducts (via its product form) and the BoMs that it is a byproduct of are now counted towards its # BoMs smart button (we will now also see these BoMs when clicking on the smart button). Of course when there is no cost share for byproducts then clicking on "Compute Price for BoM" will not change the a byproduct's cost and if there are multiple BoMs the prodcut is a byproduct of, the calculation will only be based on the first BoM it finds (i.e. same as current logic for manufactured products). BoM Cost report has been updated to include byproducts with cost shares (byproducts with cost share = 0 will not show up in report). Additionally we update the report to display operations only costs now that BoMs are allowed to have no components in them. Part 1 of Task: 2440068 Upgrade PR: odoo/upgrade#2727 Related ENT PR: odoo/enterprise#20169 Part-of: odoo/odoo#74951
Showing
- addons/mrp/models/mrp_bom.py 15 additions, 0 deletionsaddons/mrp/models/mrp_bom.py
- addons/mrp/models/mrp_production.py 14 additions, 3 deletionsaddons/mrp/models/mrp_production.py
- addons/mrp/models/product.py 4 additions, 4 deletionsaddons/mrp/models/product.py
- addons/mrp/models/stock_move.py 9 additions, 4 deletionsaddons/mrp/models/stock_move.py
- addons/mrp/report/mrp_report_bom_structure.py 66 additions, 1 deletionaddons/mrp/report/mrp_report_bom_structure.py
- addons/mrp/report/mrp_report_bom_structure.xml 75 additions, 14 deletionsaddons/mrp/report/mrp_report_bom_structure.xml
- addons/mrp/static/src/js/mrp_bom_report.js 21 additions, 0 deletionsaddons/mrp/static/src/js/mrp_bom_report.js
- addons/mrp/views/mrp_bom_views.xml 4 additions, 2 deletionsaddons/mrp/views/mrp_bom_views.xml
- addons/mrp/views/mrp_production_views.xml 1 addition, 0 deletionsaddons/mrp/views/mrp_production_views.xml
- addons/mrp_account/models/mrp_production.py 15 additions, 6 deletionsaddons/mrp_account/models/mrp_production.py
- addons/mrp_account/models/product.py 22 additions, 4 deletionsaddons/mrp_account/models/product.py
- addons/mrp_account/tests/test_bom_price.py 39 additions, 0 deletionsaddons/mrp_account/tests/test_bom_price.py
- addons/mrp_account/tests/test_valuation_layers.py 40 additions, 0 deletionsaddons/mrp_account/tests/test_valuation_layers.py
Loading
Please register or sign in to comment