Browse Source

July 4: [ADD] Initial commit 'manufacture_process_costing'

pull/254/merge
RisvanaCybro 10 months ago
parent
commit
cede65bc40
  1. 48
      manufacture_process_costing/README.rst
  2. 23
      manufacture_process_costing/__init__.py
  3. 59
      manufacture_process_costing/__manifest__.py
  4. 5
      manufacture_process_costing/doc/RELEASE_NOTES.md
  5. 31
      manufacture_process_costing/models/__init__.py
  6. 64
      manufacture_process_costing/models/direct_labour_cost.py
  7. 64
      manufacture_process_costing/models/direct_material_cost.py
  8. 64
      manufacture_process_costing/models/direct_overhead_cost.py
  9. 146
      manufacture_process_costing/models/mrp_bom.py
  10. 50
      manufacture_process_costing/models/mrp_cancel_reason.py
  11. 230
      manufacture_process_costing/models/mrp_production.py
  12. 33
      manufacture_process_costing/models/mrp_workcenter.py
  13. 65
      manufacture_process_costing/models/mrp_workorder.py
  14. 35
      manufacture_process_costing/models/res_config_settings.py
  15. 219
      manufacture_process_costing/report/mrp_bom_cost_report_templates.xml
  16. 14
      manufacture_process_costing/report/mrp_bom_cost_reports.xml
  17. 295
      manufacture_process_costing/report/mrp_production_cost_report_templates.xml
  18. 14
      manufacture_process_costing/report/mrp_production_cost_reports.xml
  19. 5
      manufacture_process_costing/security/ir.model.access.csv
  20. BIN
      manufacture_process_costing/static/description/assets/icons/check.png
  21. BIN
      manufacture_process_costing/static/description/assets/icons/chevron.png
  22. BIN
      manufacture_process_costing/static/description/assets/icons/cogs.png
  23. BIN
      manufacture_process_costing/static/description/assets/icons/consultation.png
  24. BIN
      manufacture_process_costing/static/description/assets/icons/ecom-black.png
  25. BIN
      manufacture_process_costing/static/description/assets/icons/education-black.png
  26. BIN
      manufacture_process_costing/static/description/assets/icons/hotel-black.png
  27. BIN
      manufacture_process_costing/static/description/assets/icons/license.png
  28. BIN
      manufacture_process_costing/static/description/assets/icons/lifebuoy.png
  29. BIN
      manufacture_process_costing/static/description/assets/icons/manufacturing-black.png
  30. BIN
      manufacture_process_costing/static/description/assets/icons/pos-black.png
  31. BIN
      manufacture_process_costing/static/description/assets/icons/puzzle.png
  32. BIN
      manufacture_process_costing/static/description/assets/icons/restaurant-black.png
  33. BIN
      manufacture_process_costing/static/description/assets/icons/service-black.png
  34. BIN
      manufacture_process_costing/static/description/assets/icons/trading-black.png
  35. BIN
      manufacture_process_costing/static/description/assets/icons/training.png
  36. BIN
      manufacture_process_costing/static/description/assets/icons/update.png
  37. BIN
      manufacture_process_costing/static/description/assets/icons/user.png
  38. BIN
      manufacture_process_costing/static/description/assets/icons/wrench.png
  39. BIN
      manufacture_process_costing/static/description/assets/misc/categories.png
  40. BIN
      manufacture_process_costing/static/description/assets/misc/check-box.png
  41. BIN
      manufacture_process_costing/static/description/assets/misc/compass.png
  42. BIN
      manufacture_process_costing/static/description/assets/misc/corporate.png
  43. BIN
      manufacture_process_costing/static/description/assets/misc/customer-support.png
  44. BIN
      manufacture_process_costing/static/description/assets/misc/cybrosys-logo.png
  45. BIN
      manufacture_process_costing/static/description/assets/misc/features.png
  46. BIN
      manufacture_process_costing/static/description/assets/misc/logo.png
  47. BIN
      manufacture_process_costing/static/description/assets/misc/pictures.png
  48. BIN
      manufacture_process_costing/static/description/assets/misc/pie-chart.png
  49. BIN
      manufacture_process_costing/static/description/assets/misc/right-arrow.png
  50. BIN
      manufacture_process_costing/static/description/assets/misc/star.png
  51. BIN
      manufacture_process_costing/static/description/assets/misc/support.png
  52. BIN
      manufacture_process_costing/static/description/assets/misc/whatsapp.png
  53. BIN
      manufacture_process_costing/static/description/assets/modules/1.png
  54. BIN
      manufacture_process_costing/static/description/assets/modules/2.png
  55. BIN
      manufacture_process_costing/static/description/assets/modules/3.png
  56. BIN
      manufacture_process_costing/static/description/assets/modules/4.png
  57. BIN
      manufacture_process_costing/static/description/assets/modules/5.png
  58. BIN
      manufacture_process_costing/static/description/assets/modules/6.png
  59. BIN
      manufacture_process_costing/static/description/assets/screenshots/hero__1.gif
  60. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss1.png
  61. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss10.png
  62. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss11.png
  63. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss12.png
  64. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss13.png
  65. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss14.png
  66. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss15.png
  67. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss16.png
  68. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss17.png
  69. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss18.png
  70. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss19.png
  71. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss2.png
  72. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss20.png
  73. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss21.png
  74. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss22.png
  75. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss23.png
  76. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss24.png
  77. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss25.png
  78. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss26.png
  79. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss27.png
  80. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss28.png
  81. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss29.png
  82. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss3.png
  83. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss30.png
  84. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss31.png
  85. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss32.png
  86. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss33.png
  87. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss34.png
  88. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss35.png
  89. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss4.png
  90. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss5.png
  91. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss6.png
  92. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss7.png
  93. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss8.png
  94. BIN
      manufacture_process_costing/static/description/assets/screenshots/ss9.png
  95. BIN
      manufacture_process_costing/static/description/assets/screenshots/work_1.png
  96. BIN
      manufacture_process_costing/static/description/assets/screenshots/work_10.png
  97. BIN
      manufacture_process_costing/static/description/assets/screenshots/work_11.png
  98. BIN
      manufacture_process_costing/static/description/assets/screenshots/work_12.png
  99. BIN
      manufacture_process_costing/static/description/assets/screenshots/work_13.png
  100. BIN
      manufacture_process_costing/static/description/assets/screenshots/work_14.png

48
manufacture_process_costing/README.rst

@ -0,0 +1,48 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Process Cost of Manufacturing Orders
====================================
* This module allow to manage process cost of manufacturing orders.
Configuration
=============
- www.odoo.com/documentation/15.0/setup/install.html
- Install our custom addon
License
-------
General Public License, Version 3 (LGPL v3).
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developer: (V16) Javid A,
(V15) Adarsh K,
Contact: odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com
Further information
===================
HTML Description: `<static/description/index.html>`__

23
manufacture_process_costing/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

59
manufacture_process_costing/__manifest__.py

@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Process Cost of Manufacturing Orders',
'version': '15.0.1.0.0',
'category': 'Manufacturing',
'summary': """Manufacture Process Costing By Material Cost, Labour Cost and
Overhead Cost""",
'description': """This module helps to calculate process cost of
manufacturing order and workorder with material cost, labour cost and
overhead cost from components and work center. It calculates both
estimated costing and real costing. Estimated costing is done on Bill of
Material-BOM and real costing calculated on manufacturing order based on
real-time consumption and quantity consumption. You can also provide a
cancel reason for canceling the manufacture order.You can also see the
reports for BOM and Manufacture order. Also, you can add cancel
reasons.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://cybrosys.com',
'depends': ['base', 'mrp'],
'data': [
'security/ir.model.access.csv',
'views/res_config_settings_views.xml',
'views/mrp_bom_views.xml',
'views/mrp_production_views.xml',
'views/mrp_workcenter_views.xml',
'views/mrp_cancel_reason_views.xml',
'report/mrp_bom_cost_reports.xml',
'report/mrp_bom_cost_report_templates.xml',
'report/mrp_production_cost_reports.xml',
'report/mrp_production_cost_report_templates.xml',
],
'images': ['static/description/banner.png'],
'License': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

5
manufacture_process_costing/doc/RELEASE_NOTES.md

@ -0,0 +1,5 @@
#### 28.06.2024
#### Version 15.0.1.0.0
#### ADD
- Initial commit for Process Cost of Manufacturing Orders

31
manufacture_process_costing/models/__init__.py

@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import direct_labour_cost
from . import direct_material_cost
from . import direct_overhead_cost
from . import mrp_bom
from . import mrp_cancel_reason
from . import mrp_production
from . import mrp_workorder
from . import mrp_workcenter
from . import res_config_settings

64
manufacture_process_costing/models/direct_labour_cost.py

@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class DirectLabourCost(models.Model):
"""This class creates a new model with the name direct.labour.cost"""
_name = 'direct.labour.cost'
_description = 'Direct Labour Cost'
labour_cost_id = fields.Many2one('mrp.bom',
string='Labour Cost',
help='Corresponding bill of materials')
operation = fields.Char(string='Operation',
help='Operation required for the work')
work_center_id = fields.Many2one('mrp.workcenter',
string='Work Center',
help='Corresponding work center')
planned_minute = fields.Float(string='Planned Minute',
help='Planned minutes for the work')
cost_minute = fields.Float(string='Cost/Minute',
help='Cost per minute for the work')
total_cost = fields.Float(compute='_compute_total_cost', store=True,
string='Total Cost', help='Total labour cost')
production_labour_id = fields.Many2one('mrp.production',
string='Production Labour',
help='corresponding manufacturing '
'order')
actual_minute = fields.Float(string='Actual Minute',
help='Actual minutes taken for the work')
total_actual_cost = fields.Float(compute='_compute_total_actual_cost',
string='Total Actual Cost',
help='Total Actual labour cost')
@api.depends('planned_minute', 'cost_minute')
def _compute_total_cost(self):
"""Calculate total_cost based on planned_minute and cost_minute"""
for rec in self:
rec.total_cost = rec.planned_minute * rec.cost_minute
@api.depends('actual_minute', 'cost_minute')
def _compute_total_actual_cost(self):
"""Calculate total_actual_cost based on actual_minute and cost_minute"""
for rec in self:
rec.total_actual_cost = rec.actual_minute * rec.cost_minute

64
manufacture_process_costing/models/direct_material_cost.py

@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class DirectMaterialCost(models.Model):
"""This class creates a new model with the name direct.material.cost"""
_name = 'direct.material.cost'
_description = 'Direct Material Cost'
material_cost_id = fields.Many2one('mrp.bom',
string='Material Cost',
help='Corresponding bill of materials')
product_id = fields.Many2one('product.product',
string='Product',
help='Product required for the work')
planned_qty = fields.Integer(string='Planned Qty',
help='Planned minutes for the work')
uom_id = fields.Many2one('uom.uom', string='UoM',
help="Unit of measure")
cost_unit = fields.Float(string='Cost/Unit',
help='Cost per unit for the work')
total_cost = fields.Float(compute='_compute_total_cost', store=True,
string='Total Cost', help='Total material cost')
production_material_id = fields.Many2one('mrp.production',
string='Production Material',
help='Corresponding manufacturing '
'order')
actual_quantity = fields.Integer(string='Actual Quantity',
help='Actual quantity taken for the work')
total_actual_cost = fields.Float(compute='_compute_total_actual_cost',
string='Total Actual Cost',
help='Total actual material cost')
@api.depends('planned_qty', 'cost_unit')
def _compute_total_cost(self):
"""Calculate total_cost based on planned_qty and cost_unit"""
for rec in self:
rec.total_cost = rec.planned_qty * rec.cost_unit
@api.depends('actual_quantity', 'cost_unit')
def _compute_total_actual_cost(self):
"""Calculate total_actual_cost based on actual_quantity and cost_unit"""
for rec in self:
rec.total_actual_cost = rec.actual_quantity * rec.cost_unit

64
manufacture_process_costing/models/direct_overhead_cost.py

@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class DirectOverheadCost(models.Model):
"""This class creates a new model with the name direct.overhead.cost"""
_name = 'direct.overhead.cost'
_description = 'Direct Overhead Cost'
overhead_cost_id = fields.Many2one('mrp.bom',
string='Overhead Cost',
help='Corresponding bill of materials')
operation = fields.Char(string='Operation',
help='Operation required for the work')
work_center_id = fields.Many2one('mrp.workcenter',
string='Work Center',
help='Corresponding work center')
planned_minute = fields.Float(string='Planned Minute',
help='Planned minutes for the work')
cost_minute = fields.Float(string='Cost/Minute',
help='Cost per minute for the work')
total_cost = fields.Float(compute='_compute_total_cost', store=True,
string='Total Cost',
help='Total overhead cost')
production_overhead_id = fields.Many2one('mrp.production',
string='Production Overhead',
help='corresponding manufacturing '
'order')
actual_minute = fields.Float(string='Actual Minute',
help='Actual minutes taken for the work')
total_actual_cost = fields.Float(compute='_compute_total_actual_cost',
help='Total Actual overhead cost')
@api.depends('planned_minute', 'cost_minute')
def _compute_total_cost(self):
"""Calculate total_cost based on planned_minute and cost_minute"""
for rec in self:
rec.total_cost = rec.planned_minute * rec.cost_minute
@api.depends('actual_minute', 'cost_minute')
def _compute_total_actual_cost(self):
"""Calculate total_actual_cost based on actual_minute and cost_minute"""
for rec in self:
rec.total_actual_cost = rec.actual_minute * rec.cost_minute

146
manufacture_process_costing/models/mrp_bom.py

@ -0,0 +1,146 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class MrpBom(models.Model):
"""This class inherits the existing class mrp.bom to add the
additional features of the costing"""
_inherit = 'mrp.bom'
material_cost_ids = fields.One2many('direct.material.cost',
'material_cost_id',
string='Material Cost',
help="Material cost")
labour_cost_ids = fields.One2many('direct.labour.cost',
'labour_cost_id',
string='Labour Cost', help="Labour cost")
overhead_cost_ids = fields.One2many('direct.overhead.cost',
'overhead_cost_id',
string='Overhead Cost', help="Overhead "
"cost")
total_material_cost = fields.Float(compute='_compute_total_material_cost',
string='Total Material Cost',
store=True, help='Total Material Cost')
total_labour_cost = fields.Float(compute='_compute_total_labour_cost',
string='Total Labour Cost',
store=True, help='Total Labour Cost')
total_overhead_cost = fields.Float(compute='_compute_total_overhead_cost',
string='Total Overhead Cost',
store=True, help='Total Overhead Cost')
@api.onchange('bom_line_ids')
def _onchange_bom_line_ids(self):
"""write into material_cost_ids when bom_line_ids is changed"""
self.write({'material_cost_ids': [(5, 0)]})
self.write({
'material_cost_ids': [
(0, 0, {
'material_cost_id': self.id,
'product_id': rec.product_id.id,
'planned_qty': rec.product_qty,
'uom_id': rec.product_id.uom_id.id,
'cost_unit': rec.product_id.standard_price,
}) for rec in self.bom_line_ids]
})
@api.onchange('operation_ids')
def _onchange_operation_ids(self):
"""write into labour_cost_ids and overhead_cost_ids when
operation_ids is changed"""
process = self.env['ir.config_parameter'].sudo()
process_value = process.get_param(
'manufacture_process_costing.process_costing_method')
if process_value == 'work-center':
self.write({'labour_cost_ids': [(5, 0)]})
self.write({
'labour_cost_ids': [
(0, 0, {
'labour_cost_id': self.id,
'operation': rec.name,
'work_center_id': rec.workcenter_id.id,
'planned_minute': rec.time_cycle,
'cost_minute': rec.workcenter_id.labour_cost,
}) for rec in self.operation_ids]
})
self.write({'overhead_cost_ids': [(5, 0)]})
self.write({
'overhead_cost_ids': [
(0, 0, {
'overhead_cost_id': self.id,
'operation': rec.name,
'work_center_id': rec.workcenter_id.id,
'planned_minute': rec.time_cycle,
'cost_minute': rec.workcenter_id.overhead_cost,
}) for rec in self.operation_ids]
})
else:
self.write({'labour_cost_ids': [(5, 0)]})
self.write({
'labour_cost_ids': [
(0, 0, {
'labour_cost_id': self.id,
'operation': rec.name,
'work_center_id': rec.workcenter_id.id,
'planned_minute': rec.time_cycle,
}) for rec in self.operation_ids]
})
self.write({'overhead_cost_ids': [(5, 0)]})
self.write({
'overhead_cost_ids': [
(0, 0, {
'overhead_cost_id': self.id,
'operation': rec.name,
'work_center_id': rec.workcenter_id.id,
'planned_minute': rec.time_cycle,
}) for rec in self.operation_ids]
})
@api.depends('material_cost_ids.total_cost')
def _compute_total_material_cost(self):
"""Calculates Total material costs"""
for result in self:
result.ensure_one()
result.total_material_cost = 0.00
if result.material_cost_ids:
result.total_material_cost = sum(
result.material_cost_ids.mapped('total_cost'))
@api.depends('labour_cost_ids.total_cost')
def _compute_total_labour_cost(self):
"""Calculate total labour costs"""
for result in self:
result.ensure_one()
result.total_labour_cost = 0.00
if result.labour_cost_ids:
result.total_labour_cost = sum(
result.labour_cost_ids.mapped('total_cost'))
@api.depends('overhead_cost_ids.total_cost')
def _compute_total_overhead_cost(self):
"""Calculate total overhead costs"""
for result in self:
result.ensure_one()
result.total_overhead_cost = 0.00
if result.overhead_cost_ids:
result.total_overhead_cost = sum(
result.overhead_cost_ids.mapped('total_cost'))

50
manufacture_process_costing/models/mrp_cancel_reason.py

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class MrpCancelReason(models.Model):
"""The class represents a new model mrp.cancel.reason"""
_name = 'mrp.cancel.reason'
_description = 'Mrp Cancel Reason'
_rec_name = 'manufacturing_id'
_order = "id desc"
reason_for_cancel = fields.Text(
string='Reason For Cancel',
help='Provide a reason for the cancellation of the manufacturing order')
manufacturing_id = fields.Many2one('mrp.production',
required=True,
string='Manufacture Order',
help='Corresponding manufacturing order')
date = fields.Datetime(
string='Cancel Date', default=fields.Datetime.now(),
help='The date and time of cancelling the manufacturing order')
cancelled_by_id = fields.Many2one(
'res.users',
string='Cancelled By',
default=lambda self: self.env.user.id,
help='The corresponding user who is cancelling the order')
def action_button_cancel(self):
"""Calls the function action_cancel() from mrp production"""
self.manufacturing_id.action_cancel()

230
manufacture_process_costing/models/mrp_production.py

@ -0,0 +1,230 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
from odoo.exceptions import ValidationError
class MrpProduction(models.Model):
"""This class inherits the existing class mrp production to add the
additional feature of the costing methods"""
_inherit = 'mrp.production'
material_cost_ids = fields.One2many('direct.material.cost',
'production_material_id',
string='Material Costs')
labour_cost_ids = fields.One2many('direct.labour.cost',
'production_labour_id',
string='Labour Costs')
overhead_cost_ids = fields.One2many('direct.overhead.cost',
'production_overhead_id',
string='Overhead Costs')
total_material_cost = fields.Float(compute='_compute_total_material_cost',
store=True,
string='Total Material Cost',
help='Total Material Cost of production')
total_labour_cost = fields.Float(compute='_compute_total_labour_cost',
store=True, string='Total Labour Cost',
help='Total Labour Cost of production')
total_overhead_cost = fields.Float(compute='_compute_total_overhead_cost',
store=True,
string='Total Overhead Cost',
help='Total Overhead Cost of production')
total_cost = fields.Float(compute='_compute_total_cost', store=True,
help='Total Cost of production',
string='Total Cost')
total_actual_material_cost = fields.Float(
string='Total Actual Material Cost',
compute='_compute_total_actual_material_cost', store=True,
help='Total Actual Material Cost of production')
total_actual_labour_cost = fields.Float(string='Total Actual Labour Cost',
compute='_compute_total_actual_'
'labour_cost',
store=True,
help='Total Actual Labour Cost '
'of production')
total_actual_overhead_cost = fields.Float(
string='Total Actual Overhead Cost',
compute='_compute_total_actual_overhead_cost', store=True,
help='Total Actual Overhead Cost of production')
total_actual_cost = fields.Float(compute='_compute_total_actual_cost',
store=True, string='Total Actual Cost',
help='Total Actual Cost of production')
def action_cancel_button(self):
"""Returns the mrp.cancel.reason"""
reason = self.env['mrp.cancel.reason'].create(
{'manufacturing_id': self.id})
return {
'type': 'ir.actions.act_window',
'name': 'Cancel Reason',
'view_mode': 'form',
'res_model': 'mrp.cancel.reason',
'target': 'new',
'view_type': 'form',
'res_id': reason.id,
}
@api.model_create_multi
def create(self, vals_list):
"""Writes data to material_cost_ids, labour_cost_ids and
overhead_cost_ids when change in bom_id"""
res = super().create(vals_list)
bom = res.bom_id
if not bom:
raise ValidationError("BOM ID does not exist or is not assigned properly.")
res.write({'material_cost_ids': [(5, 0)]})
res.write({
'material_cost_ids': [
(0, 0, {
'production_material_id': res.id,
'material_cost_id': self.id,
'product_id': rec.product_id.id,
'planned_qty': rec.planned_qty,
'uom_id': rec.uom_id.id,
'cost_unit': rec.cost_unit,
}) for rec in res.bom_id.material_cost_ids]
})
res.write({'labour_cost_ids': [(5, 0)]})
res.write({
'labour_cost_ids': [
(0, 0, {
'production_labour_id': res.id,
'labour_cost_id': self.id,
'operation': rec.operation,
'work_center_id': rec.work_center_id.id,
'planned_minute': rec.planned_minute,
'cost_minute': rec.cost_minute,
}) for rec in res.bom_id.labour_cost_ids]
})
res.write({'overhead_cost_ids': [(5, 0)]})
res.write({
'overhead_cost_ids': [
(0, 0, {
'production_overhead_id': res.id,
'overhead_cost_id': self.id,
'operation': rec.operation,
'work_center_id': rec.work_center_id.id,
'planned_minute': rec.planned_minute,
'cost_minute': rec.cost_minute,
}) for rec in res.bom_id.overhead_cost_ids]
})
return res
@api.onchange('bom_id')
def _onchange_bom_id(self):
"""Writes data to material_cost_ids, labour_cost_ids and
overhead_cost_ids when change in bom_id"""
self.write({'material_cost_ids': [(5, 0)]})
self.write({
'material_cost_ids': [
(0, 0, {
'production_material_id': self.id,
'material_cost_id': self.bom_id.id,
'product_id': rec.product_id.id,
'planned_qty': rec.planned_qty,
'uom_id': rec.uom_id.id,
'cost_unit': rec.cost_unit,
}) for rec in self.bom_id.material_cost_ids]
})
self.write({'labour_cost_ids': [(5, 0)]})
self.write({
'labour_cost_ids': [
(0, 0, {
'production_labour_id': self.id,
'labour_cost_id': rec.id,
'operation': rec.operation,
'work_center_id': rec.work_center_id.id,
'planned_minute': rec.planned_minute,
'cost_minute': rec.cost_minute,
}) for rec in self.bom_id.labour_cost_ids]
})
self.write({'overhead_cost_ids': [(5, 0)]})
self.write({
'overhead_cost_ids': [
(0, 0, {
'production_overhead_id': self.id,
'overhead_cost_id': rec.id,
'operation': rec.operation,
'work_center_id': rec.work_center_id.id,
'planned_minute': rec.planned_minute,
'cost_minute': rec.cost_minute,
}) for rec in self.bom_id.overhead_cost_ids]
})
@api.depends('material_cost_ids.total_cost')
def _compute_total_material_cost(self):
"""Calculate total_material_cost"""
for result in self:
result.total_material_cost = sum(
result.mapped('material_cost_ids').mapped('total_cost'))
@api.depends('labour_cost_ids.total_cost')
def _compute_total_labour_cost(self):
"""Calculate total_labour_cost"""
for result in self:
result.total_labour_cost = sum(
result.mapped('labour_cost_ids').mapped('total_cost'))
@api.depends('overhead_cost_ids.total_cost')
def _compute_total_overhead_cost(self):
"""Calculates total_overhead_cost"""
for result in self:
result.total_overhead_cost = sum(
result.mapped('overhead_cost_ids').mapped('total_cost'))
@api.depends('total_material_cost', 'total_labour_cost',
'total_overhead_cost')
def _compute_total_cost(self):
"""Calculates total_cost"""
for rec in self:
rec.total_cost = rec.total_material_cost + \
rec.total_labour_cost + rec.total_overhead_cost
@api.depends('material_cost_ids.total_actual_cost')
def _compute_total_actual_material_cost(self):
"""Calculates total_actual_material_cost"""
for cost in self:
cost.total_actual_material_cost = sum(
cost.mapped('material_cost_ids').mapped('total_actual_cost'))
@api.depends('labour_cost_ids.total_actual_cost')
def _compute_total_actual_labour_cost(self):
"""Calculates total_actual_labour_cost"""
for cost in self:
cost.total_actual_labour_cost = sum(
cost.mapped('labour_cost_ids').mapped('total_actual_cost'))
@api.depends('overhead_cost_ids.total_actual_cost')
def _compute_total_actual_overhead_cost(self):
"""Calculates total_actual_overhead_cost"""
for cost in self:
cost.total_actual_overhead_cost = sum(
cost.mapped('overhead_cost_ids').mapped('total_actual_cost'))
@api.depends('total_actual_material_cost', 'total_actual_labour_cost',
'total_actual_overhead_cost')
def _compute_total_actual_cost(self):
"""Calculates total_actual_cost"""
for rec in self:
rec.total_actual_cost = rec.total_actual_material_cost + \
rec.total_actual_labour_cost + \
rec.total_actual_overhead_cost

33
manufacture_process_costing/models/mrp_workcenter.py

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class MrpWorkcenter(models.Model):
"""This class inherits the already existing class mrp workcenter to add
the total cost of overhead and labour per minute"""
_inherit = 'mrp.workcenter'
overhead_cost = fields.Float(string='Overhead Costs per minute',
help='Set an overhead cost cost per minute')
labour_cost = fields.Float(string='Labour Costs per minute',
help='Set an labour cost cost per minute')

65
manufacture_process_costing/models/mrp_workorder.py

@ -0,0 +1,65 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models
class MrpWorkorder(models.Model):
"""This class inherits the existing class with model name mrp.workorder
to define a function to automatically calculate the costings"""
_inherit = 'mrp.workorder'
def button_finish(self):
"""Super the button_finish button in workorder and update the
actual_minute and actual_quantity of labour_cost_ids,
overhead_cost_ids, material_cost_ids according to the settings value"""
res = super(MrpWorkorder, self).button_finish()
process = self.env['ir.config_parameter'].sudo()
process_value = process.get_param(
'manufacture_process_costing.process_costing_method')
if process_value == 'work-center':
for rec in self.production_id.labour_cost_ids:
for val in self:
if rec.operation == val.name:
labour_id = rec.id
self.production_id.write({
'labour_cost_ids': [
(1, labour_id, {
'actual_minute': rec.duration
}) for rec in self]
})
for rec in self.production_id.overhead_cost_ids:
for val in self:
if rec.operation == val.name:
overhead_id = rec.id
self.production_id.write({
'overhead_cost_ids': [
(1, overhead_id, {
'actual_minute': rec.duration
}) for rec in self]
})
self.production_id.write({
'material_cost_ids': [
(1, rec.id, {
'actual_quantity': rec.planned_qty
}) for rec in self.production_id.material_cost_ids]
})
return res

35
manufacture_process_costing/models/res_config_settings.py

@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
"""This class extends the 'res.config.settings' model to add a custom
field for configuring the process costing method"""
_inherit = 'res.config.settings'
process_costing_method = fields.Selection(selection=[
('manually', 'Manually'), ('work-center', 'Work Center')],
default='manually', string='Process Costing Method',
config_parameter='manufacture_process_costing.process_costing_method',
help='How to compute process costing, whether manually or work '
'center based')

219
manufacture_process_costing/report/mrp_bom_cost_report_templates.xml

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Bom cost report template -->
<template id="report_bom_cost">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<t t-foreach="docs" t-as="data">
<span style="font-size:30px;">
<strong>Bill Of Materials</strong>
</span>
<table class="table table-borderless">
<tr>
<td>
<p>
<strong>Product :</strong>
<t t-esc="data['product_tmpl_id'].name"/>
</p>
</td>
<td>
<p>
<strong>Reference :</strong>
<t t-esc="data['code']"/>
</p>
</td>
</tr>
<tr>
<td>
<p>
<strong>Product Variant :</strong>
<t t-esc="data['product_id'].name"/>
</p>
</td>
<td>
<p>
<strong>Bom Type :</strong>
<t t-esc="data['type']"/>
</p>
</td>
</tr>
<tr>
<td>
<p>
<strong>Quantity :</strong>
<t t-esc="data['product_qty']"/>
</p>
</td>
<td>
<p>
<strong>Company :</strong>
<t t-esc="data['company_id'].name"/>
</p>
</td>
</tr>
</table>
<br/>
<span style="font-size:25px;">
<strong>Components</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Product</th>
<th>Product Qunatity</th>
<th>Product UOM</th>
<th>Variants</th>
<th>Consumed In Operation</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['bom_line_ids']" t-as="rec">
<td>
<t t-esc="rec.product_id.name"/>
</td>
<td>
<t t-esc="rec.product_qty"/>
</td>
<td>
<t t-esc="rec.product_uom_id.name"/>
</td>
<td>
<t t-esc="rec.product_tmpl_id.name"/>
</td>
<td>
<t t-esc="rec.operation_id.name"/>
</td>
</tr>
</tbody>
</table>
<br/>
<span style="font-size:25px;">
<strong>Direct Material Cost</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Product</th>
<th>Planned Qunatity</th>
<th>UOM</th>
<th>Cost/Unit</th>
<th>Total Cost</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['material_cost_ids']"
t-as="rec">
<td>
<t t-esc="rec.product_id.name"/>
</td>
<td>
<t t-esc="rec.planned_qty"/>
</td>
<td>
<t t-esc="rec.uom_id.name"/>
</td>
<td>
<t t-esc="rec.cost_unit"/>
</td>
<td>
<t t-esc="rec.total_cost"/>
</td>
</tr>
</tbody>
</table>
<h6 class="oe_subtotal_footer oe_right">Total Material
Cost :
<strong>
<t t-esc="data['total_material_cost']"/>
</strong>
</h6>
<br/>
<span style="font-size:25px;">
<strong>Direct Labour Cost</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Operation</th>
<th>Work Center</th>
<th>Planned Minute</th>
<th>Cost/Minute</th>
<th>Total Cost</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['labour_cost_ids']"
t-as="rec">
<td>
<t t-esc="rec.operation"/>
</td>
<td>
<t t-esc="rec.work_center_id.name"/>
</td>
<td>
<t t-esc="rec.planned_minute"/>
</td>
<td>
<t t-esc="rec.cost_minute"/>
</td>
<td>
<t t-esc="rec.total_cost"/>
</td>
</tr>
</tbody>
</table>
<h6 class="oe_subtotal_footer oe_right">Total Labour
Cost :
<strong>
<t t-esc="data['total_labour_cost']"/>
</strong>
</h6>
<br/>
<span style="font-size:25px;">
<strong>Direct Overhead Cost</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Operation</th>
<th>Work Center</th>
<th>Planned Minute</th>
<th>Cost/Minute</th>
<th>Total Cost</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['overhead_cost_ids']"
t-as="rec">
<td>
<t t-esc="rec.operation"/>
</td>
<td>
<t t-esc="rec.work_center_id.name"/>
</td>
<td>
<t t-esc="rec.planned_minute"/>
</td>
<td>
<t t-esc="rec.cost_minute"/>
</td>
<td>
<t t-esc="rec.total_cost"/>
</td>
</tr>
</tbody>
</table>
<h6 class="oe_subtotal_footer oe_right">Total Overhead
Cost :
<strong>
<t t-esc="data['total_overhead_cost']"/>
</strong>
</h6>
<br/>
</t>
</div>
</t>
</t>
</template>
</odoo>

14
manufacture_process_costing/report/mrp_bom_cost_reports.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Bom cost report action -->
<record id="action_report_bom_cost" model="ir.actions.report">
<field name="name">Bom Cost Report</field>
<field name="model">mrp.bom</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">manufacture_process_costing.report_bom_cost</field>
<field name="report_file">manufacture_process_costing.report_bom_cost</field>
<field name="print_report_name">'BOM Cost Report - %s' % object.display_name</field>
<field name="binding_model_id" ref="model_mrp_bom"/>
<field name="binding_type">report</field>
</record>
</odoo>

295
manufacture_process_costing/report/mrp_production_cost_report_templates.xml

@ -0,0 +1,295 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Mrp production cost report template -->
<template id="production_cost_report">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<t t-foreach="docs" t-as="data">
<span style="font-size:30px;">
<strong>Manufacturing Orders -
<t t-esc="data['name']"/>
</strong>
</span>
<table class="table table-borderless">
<tr>
<td>
<p>
<strong>Product :</strong>
<t t-esc="data['product_id'].name"/>
</p>
</td>
<td>
<p>
<strong>Deadline Start :</strong>
<t t-esc="data['date_planned_start']"/>
</p>
</td>
</tr>
<tr>
<td>
<p>
<strong>Quantity To Produce :</strong>
<t t-esc="data['product_qty']"/>
</p>
</td>
<td>
<p>
<strong>Responsible :</strong>
<t t-esc="data['user_id'].name"/>
</p>
</td>
</tr>
<tr>
<td>
<p>
<strong>Bill Of Material :</strong>
<t t-esc="data['bom_id'].product_tmpl_id.name"/>
</p>
</td>
<td>
<p>
<strong>Company :</strong>
<t t-esc="data['company_id'].name"/>
</p>
</td>
</tr>
<tr>
<td>
<p>
<strong>Source :</strong>
<t t-esc="data['origin']"/>
</p>
</td>
</tr>
</table>
<br/>
<span style="font-size:25px;">
<strong>Consumed Materials</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Product</th>
<th>Unit Of Measure</th>
<th>To Consume</th>
<th>Consumed</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['move_raw_ids']" t-as="rec">
<td>
<t t-esc="rec.product_id.name"/>
</td>
<td>
<t t-esc="rec.product_uom.name"/>
</td>
<td>
<t t-esc="rec.product_uom_qty"/>
</td>
<td>
<t t-esc="rec.quantity_done"/>
</td>
</tr>
</tbody>
</table>
<br/>
<t t-if="data['state'] == 'done'">
<span style="font-size:25px;">
<strong>Finished Products</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Product</th>
<th>Unit Of Measure</th>
<th>Produced</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<t t-esc="data['product_id'].name"/>
</td>
<td>
<t t-esc="data['product_uom_id'].name"/>
</td>
<td>
<t t-esc="data['qty_produced']"/>
</td>
</tr>
</tbody>
</table>
<br/>
</t>
<span style="font-size:25px;">
<strong>Manufacturing Material Cost</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Product</th>
<th>Planned Qunatity</th>
<th>Actual Qunatity</th>
<th>UOM</th>
<th>Cost/Unit</th>
<th>Total Cost</th>
<th>Total Actual Cost</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['material_cost_ids']"
t-as="rec">
<td>
<t t-esc="rec.product_id.name"/>
</td>
<td>
<t t-esc="rec.planned_qty"/>
</td>
<td>
<t t-esc="rec.actual_quantity"/>
</td>
<td>
<t t-esc="rec.uom_id.name"/>
</td>
<td>
<t t-esc="rec.cost_unit"/>
</td>
<td>
<t t-esc="rec.total_cost"/>
</td>
<td>
<t t-esc="rec.total_actual_cost"/>
</td>
</tr>
</tbody>
</table>
<h6 class="oe_subtotal_footer oe_right">Total Material
Cost :
<strong>
<t t-esc="data['total_material_cost']"/>
</strong>
</h6>
<h6 class="oe_subtotal_footer oe_right">Total Actual
Material Cost :
<strong>
<t t-esc="data['total_actual_material_cost']"/>
</strong>
</h6>
<br/>
<span style="font-size:25px;">
<strong>Manufacturing Labour Cost</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Operation</th>
<th>Work Center</th>
<th>Planned Minute</th>
<th>Actual Minute</th>
<th>Cost/Minute</th>
<th>Total Cost</th>
<th>Total Actual Cost</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['labour_cost_ids']"
t-as="rec">
<td>
<t t-esc="rec.operation"/>
</td>
<td>
<t t-esc="rec.work_center_id.name"/>
</td>
<td>
<t t-esc="rec.planned_minute"/>
</td>
<td>
<t t-esc="rec.actual_minute"/>
</td>
<td>
<t t-esc="rec.cost_minute"/>
</td>
<td>
<t t-esc="rec.total_cost"/>
</td>
<td>
<t t-esc="rec.total_actual_cost"/>
</td>
</tr>
</tbody>
</table>
<h6 class="oe_subtotal_footer oe_right">Total Labour
Cost :
<strong>
<t t-esc="data['total_labour_cost']"/>
</strong>
</h6>
<h6 class="oe_subtotal_footer oe_right">Total Actual
Labour Cost :
<strong>
<t t-esc="data['total_actual_labour_cost']"/>
</strong>
</h6>
<br/>
<span style="font-size:25px;">
<strong>Manufacturing Overhead Cost</strong>
</span>
<table class="table">
<thead>
<tr>
<th>Operation</th>
<th>Work Center</th>
<th>Planned Minute</th>
<th>Actual Minute</th>
<th>Cost/Minute</th>
<th>Total Cost</th>
<th>Total Actual Cost</th>
</tr>
</thead>
<tbody>
<tr t-foreach="data['overhead_cost_ids']"
t-as="rec">
<td>
<t t-esc="rec.operation"/>
</td>
<td>
<t t-esc="rec.work_center_id.name"/>
</td>
<td>
<t t-esc="rec.planned_minute"/>
</td>
<td>
<t t-esc="rec.actual_minute"/>
</td>
<td>
<t t-esc="rec.cost_minute"/>
</td>
<td>
<t t-esc="rec.total_cost"/>
</td>
<td>
<t t-esc="rec.total_actual_cost"/>
</td>
</tr>
</tbody>
</table>
<h6 class="oe_subtotal_footer oe_right">Total Labour
Cost :
<strong>
<t t-esc="data['total_overhead_cost']"/>
</strong>
</h6>
<h6 class="oe_subtotal_footer oe_right">Total Actual
Labour Cost :
<strong>
<t t-esc="data['total_actual_overhead_cost']"/>
</strong>
</h6>
<br/>
</t>
</div>
</t>
</t>
</template>
</odoo>

14
manufacture_process_costing/report/mrp_production_cost_reports.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Mrp production cost report action -->
<record id="action_production_cost_report" model="ir.actions.report">
<field name="name">Production Cost Report</field>
<field name="model">mrp.production</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">manufacture_process_costing.production_cost_report</field>
<field name="report_file">manufacture_process_costing.production_cost_report</field>
<field name="print_report_name">'Production Cost Report - %s' % object.display_name</field>
<field name="binding_model_id" ref="model_mrp_production"/>
<field name="binding_type">report</field>
</record>
</odoo>

5
manufacture_process_costing/security/ir.model.access.csv

@ -0,0 +1,5 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_direct_material_cost,access.direct.material.cost,model_direct_material_cost,base.group_user,1,1,1,1
access_direct_labour_cost,access.direct.labour.cost,model_direct_labour_cost,base.group_user,1,1,1,1
access_direct_overhead_cost,access.direct.overhead.cost,model_direct_overhead_cost,base.group_user,1,1,1,1
access_mrp_cancel_reason,access.mrp.cancel.reason,model_mrp_cancel_reason,base.group_user,1,1,1,1
1 id name model_id/id group_id/id perm_read perm_write perm_create perm_unlink
2 access_direct_material_cost access.direct.material.cost model_direct_material_cost base.group_user 1 1 1 1
3 access_direct_labour_cost access.direct.labour.cost model_direct_labour_cost base.group_user 1 1 1 1
4 access_direct_overhead_cost access.direct.overhead.cost model_direct_overhead_cost base.group_user 1 1 1 1
5 access_mrp_cancel_reason access.mrp.cancel.reason model_mrp_cancel_reason base.group_user 1 1 1 1

BIN
manufacture_process_costing/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
manufacture_process_costing/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
manufacture_process_costing/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
manufacture_process_costing/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
manufacture_process_costing/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
manufacture_process_costing/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
manufacture_process_costing/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
manufacture_process_costing/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
manufacture_process_costing/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
manufacture_process_costing/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
manufacture_process_costing/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
manufacture_process_costing/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
manufacture_process_costing/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
manufacture_process_costing/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
manufacture_process_costing/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
manufacture_process_costing/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
manufacture_process_costing/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
manufacture_process_costing/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
manufacture_process_costing/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
manufacture_process_costing/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
manufacture_process_costing/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
manufacture_process_costing/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
manufacture_process_costing/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
manufacture_process_costing/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
manufacture_process_costing/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
manufacture_process_costing/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
manufacture_process_costing/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
manufacture_process_costing/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
manufacture_process_costing/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
manufacture_process_costing/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
manufacture_process_costing/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
manufacture_process_costing/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
manufacture_process_costing/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
manufacture_process_costing/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
manufacture_process_costing/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
manufacture_process_costing/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
manufacture_process_costing/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
manufacture_process_costing/static/description/assets/modules/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
manufacture_process_costing/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/hero__1.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss15.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss17.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss18.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss19.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss21.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss22.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss23.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss25.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss26.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss27.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss28.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss29.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss30.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss31.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss33.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss34.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss35.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/ss9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/work_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/work_10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/work_11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/work_12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/work_13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
manufacture_process_costing/static/description/assets/screenshots/work_14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save