-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] Add module mrp_production_quality_operator
- Loading branch information
Showing
7 changed files
with
59 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
custom_mrp_production_fields/views/mrp_production_views.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "Adds custom fields qty_rejected, operator_id and quality_responsible_id to MRP 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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import mrp_production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
28
mrp_production_quality_operator/views/mrp_production_views.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |