Skip to content

Commit

Permalink
mrp_bom_responsible
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriaGForgeFlow authored and HviorForgeFlow committed Jun 23, 2022
1 parent 7377dbf commit 07d04a3
Show file tree
Hide file tree
Showing 11 changed files with 558 additions and 0 deletions.
73 changes: 73 additions & 0 deletions mrp_bom_responsible/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
===================
Mrp Bom Responsible
===================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture/tree/12.0/mrp_bom_responsible
:alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_bom_responsible
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/129/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

Adds a responsible to the Bill of Materials which then will be forwarded to the Manufacturing Order

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_bom_responsible%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* ForgeFlow S.L.

Contributors
~~~~~~~~~~~~

* Adria Gil Sorribes <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/12.0/mrp_bom_responsible>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions mrp_bom_responsible/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions mrp_bom_responsible/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Mrp Bom Responsible",
"summary": """
Adds a responsible to the Bill of Materials which then will be
forwarded to the Manufacturing Order""",
"version": "12.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow S.L.,"
"Odoo Community Association (OCA)",
"website": "https://www.github.com/OCA/manufacture",
"depends": [
"mrp"
],
"data": [
"views/mrp_bom_views.xml",
],
}
2 changes: 2 additions & 0 deletions mrp_bom_responsible/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import mrp_bom
from . import mrp_production
12 changes: 12 additions & 0 deletions mrp_bom_responsible/models/mrp_bom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class MrpBom(models.Model):
_inherit = "mrp.bom"

user_id = fields.Many2one(
"res.users", "Responsible", default=lambda self: self._uid
)
14 changes: 14 additions & 0 deletions mrp_bom_responsible/models/mrp_production.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class MrpProduction(models.Model):
_inherit = "mrp.production"

@api.onchange("bom_id")
def _onchange_bom_id(self):
super()._onchange_bom_id()
if self.bom_id and self.bom_id.user_id:
self.user_id = self.bom_id.user_id
1 change: 1 addition & 0 deletions mrp_bom_responsible/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Adria Gil Sorribes <[email protected]>
1 change: 1 addition & 0 deletions mrp_bom_responsible/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds a responsible to the Bill of Materials which then will be forwarded to the Manufacturing Order
Binary file added mrp_bom_responsible/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 07d04a3

Please sign in to comment.