From 0b8680e32f32df815867e55b7b9209410a3b0ae2 Mon Sep 17 00:00:00 2001 From: unaiberis <146723346+unaiberis@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:48:44 +0200 Subject: [PATCH] [ADD] Add module mrp_production_quality_operator (#362) --- mrp_production_quality_operator/README.rst | 37 +++++++++++++++++++ mrp_production_quality_operator/__init__.py | 1 + .../__manifest__.py | 18 +++++++++ .../models/__init__.py | 1 + .../models/mrp_production.py | 11 ++++++ .../views/mrp_production_views.xml | 28 ++++++++++++++ .../addons/mrp_production_quality_operator | 1 + .../mrp_production_quality_operator/setup.py | 6 +++ 8 files changed, 103 insertions(+) create mode 100644 mrp_production_quality_operator/README.rst create mode 100644 mrp_production_quality_operator/__init__.py create mode 100644 mrp_production_quality_operator/__manifest__.py create mode 100644 mrp_production_quality_operator/models/__init__.py create mode 100644 mrp_production_quality_operator/models/mrp_production.py create mode 100644 mrp_production_quality_operator/views/mrp_production_views.xml create mode 120000 setup/mrp_production_quality_operator/odoo/addons/mrp_production_quality_operator create mode 100644 setup/mrp_production_quality_operator/setup.py diff --git a/mrp_production_quality_operator/README.rst b/mrp_production_quality_operator/README.rst new file mode 100644 index 000000000..85c89dfed --- /dev/null +++ b/mrp_production_quality_operator/README.rst @@ -0,0 +1,37 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============================================= +MRP Production Quality Operator Custom Fields +============================================= + +The **MRP Production Quality Operator Custom Fields** module enhances +the functionality of MRP Production in Odoo by adding custom fields +`qty_rejected`, `operator_id`, and `quality_responsible_id`. +These fields allow for better tracking and management of +production quality and operator responsibilities. + +Features +======== + +- **Custom Fields**: + - **Quantity Rejected**: Tracks the quantity of rejected products during production. + - **Operator**: Associates an operator with the production order. + - **Quality Responsible**: Identifies the responsible person for ensuring product quality. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smash it by providing detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ +- Unai Beristain + +Do not contact contributors directly about support or help with technical issues. diff --git a/mrp_production_quality_operator/__init__.py b/mrp_production_quality_operator/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_quality_operator/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_quality_operator/__manifest__.py b/mrp_production_quality_operator/__manifest__.py new file mode 100644 index 000000000..59514ab57 --- /dev/null +++ b/mrp_production_quality_operator/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2024 Unai Beristain - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "MRP Production Quality Operator Custom Fields", + "version": "14.0.1.0.0", + "category": "Manufacturing", + "summary": "Fields qty_rejected, operator_id and quality_responsible_id to production", + "author": "AvanzOSC", + "website": "https://github.com/avanzosc/mrp-addons", + "license": "AGPL-3", + "depends": ["mrp", "hr"], + "data": [ + "views/mrp_production_views.xml", + ], + "installable": True, + "auto_install": False, +} diff --git a/mrp_production_quality_operator/models/__init__.py b/mrp_production_quality_operator/models/__init__.py new file mode 100644 index 000000000..a9e5f13e4 --- /dev/null +++ b/mrp_production_quality_operator/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_production diff --git a/mrp_production_quality_operator/models/mrp_production.py b/mrp_production_quality_operator/models/mrp_production.py new file mode 100644 index 000000000..e403d60fa --- /dev/null +++ b/mrp_production_quality_operator/models/mrp_production.py @@ -0,0 +1,11 @@ +from odoo import fields, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + qty_rejected = fields.Float(string="Rejected Quantity") + operator_id = fields.Many2one(comodel_name="hr.employee", string="Operator") + quality_responsible_id = fields.Many2one( + comodel_name="hr.employee", string="Quality Responsible" + ) diff --git a/mrp_production_quality_operator/views/mrp_production_views.xml b/mrp_production_quality_operator/views/mrp_production_views.xml new file mode 100644 index 000000000..7d877d5bc --- /dev/null +++ b/mrp_production_quality_operator/views/mrp_production_views.xml @@ -0,0 +1,28 @@ + + + + mrp.production + + + + + + + + + + + + + + mrp.production + + + + + + + + + + diff --git a/setup/mrp_production_quality_operator/odoo/addons/mrp_production_quality_operator b/setup/mrp_production_quality_operator/odoo/addons/mrp_production_quality_operator new file mode 120000 index 000000000..ce9a5b937 --- /dev/null +++ b/setup/mrp_production_quality_operator/odoo/addons/mrp_production_quality_operator @@ -0,0 +1 @@ +../../../../mrp_production_quality_operator \ No newline at end of file diff --git a/setup/mrp_production_quality_operator/setup.py b/setup/mrp_production_quality_operator/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_quality_operator/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)