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

[14.0][ADD] mrp_production_quality_operator #362

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions mrp_production_quality_operator/README.rst
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/avanzosc/mrp-addons/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 <unaiberistain@avanzosc.es>

Do not contact contributors directly about support or help with technical issues.
1 change: 1 addition & 0 deletions mrp_production_quality_operator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions mrp_production_quality_operator/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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,
}
1 change: 1 addition & 0 deletions mrp_production_quality_operator/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mrp_production
11 changes: 11 additions & 0 deletions mrp_production_quality_operator/models/mrp_production.py
Original file line number Diff line number Diff line change
@@ -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"
)
28 changes: 28 additions & 0 deletions mrp_production_quality_operator/views/mrp_production_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<xpath expr="//group[@name='group_extra_info']" position="inside">
<group>
<field name="qty_rejected" />
<field name="operator_id" />
<field name="quality_responsible_id" />
</group>
</xpath>
</field>
</record>

<record id="mrp_production_tree_view" model="ir.ui.view">
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_tree_view" />
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<field name="qty_rejected" optional="show" />
<field name="operator_id" optional="show" />
<field name="quality_responsible_id" optional="show" />
</xpath>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/mrp_production_quality_operator/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading