Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
747 additions
and
0 deletions.
There are no files selected for viewing
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,78 @@ | ||
====================== | ||
MRP Production Service | ||
====================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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-mig-mrp_production_service/mrp_production_service | ||
: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-mig-mrp_production_service/manufacture-12-0-mig-mrp_production_service-mrp_production_service | ||
: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-mig-mrp_production_service | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Creates procurement orders from manufacturing orders, for services included | ||
in the Bill of Materials. | ||
|
||
This allows users to include additional services that are to be procured as | ||
part of the manufacturing process. | ||
|
||
**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_production_service%0Aversion:%2012.0-mig-mrp_production_service%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 | ||
~~~~~~~ | ||
|
||
* Eficent | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Jordi Ballester Alomar <jordi.ballester@eficent.com> | ||
* Rubén Dario Bravo <rubenred18@gmail.com> | ||
|
||
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-mig-mrp_production_service/mrp_production_service>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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,5 @@ | ||
# Copyright 2016 Eficent Business and IT Consulting Services S.L. | ||
# (http://www.eficent.com) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
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,19 @@ | ||
# Copyright 2016 Eficent Business and IT Consulting Services S.L. | ||
# (http://www.eficent.com) | ||
# Copyright 2019 Rubén Bravo <rubenred18@gmail.com> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "MRP Production Service", | ||
"summary": "Creates procurement orders from manufacturing orders, for " | ||
"services included in the Bill of Materials", | ||
"version": "12.0.1.0.1", | ||
"author": "Eficent," | ||
"Odoo Community Association (OCA)", | ||
"website": "https://www.odoo-community.org", | ||
"category": "Warehouse Management", | ||
"depends": ["mrp", | ||
"subcontracted_service"], | ||
"license": "AGPL-3", | ||
'installable': True, | ||
'application': 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,22 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * mrp_production_service | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2018-12-09 10:43+0000\n" | ||
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n" | ||
"Language-Team: none\n" | ||
"Language: de\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 3.3\n" | ||
|
||
#. module: mrp_production_service | ||
#: model:ir.model,name:mrp_production_service.model_mrp_production | ||
msgid "Manufacturing Order" | ||
msgstr "Fertigungsauftrag" |
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,23 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * mrp_production_service | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: Ruben Bravo <rubenred18@gmail.com>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: \n" | ||
"POT-Creation-Date: \n" | ||
"PO-Revision-Date: \n" | ||
"Language: es\n" | ||
"X-Generator: Poedit 1.8.11\n" | ||
|
||
#. module: mrp_production_service | ||
#: model:ir.model,name:mrp_production_service.model_mrp_production | ||
msgid "Manufacturing Order" | ||
msgstr "Orden de Producción" |
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,23 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * mrp_production_service | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: Ruben Bravo <rubenred18@gmail.com>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: \n" | ||
"POT-Creation-Date: \n" | ||
"PO-Revision-Date: \n" | ||
"Language: es\n" | ||
"X-Generator: Poedit 1.8.11\n" | ||
|
||
#. module: mrp_production_service | ||
#: model:ir.model,name:mrp_production_service.model_mrp_production | ||
msgid "Manufacturing Order" | ||
msgstr "Orden de Producción" |
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,20 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * mrp_production_service | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: mrp_production_service | ||
#: model:ir.model,name:mrp_production_service.model_mrp_production | ||
msgid "Manufacturing Order" | ||
msgstr "" | ||
|
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,5 @@ | ||
# Copyright 2016 Eficent Business and IT Consulting Services S.L. | ||
# (http://www.eficent.com) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
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,50 @@ | ||
# Copyright 2016 Eficent Business and IT Consulting Services S.L. | ||
# (http://www.eficent.com) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class MrpProduction(models.Model): | ||
_inherit = "mrp.production" | ||
|
||
@api.multi | ||
def _prepare_service_procurement_values(self): | ||
self.ensure_one() | ||
location = self.location_src_id | ||
return { | ||
'company_id': self.company_id, | ||
'date_planned': self.date_planned_start, | ||
'warehouse_id': location.get_warehouse(), | ||
'group_id': self.procurement_group_id, | ||
} | ||
|
||
@api.model | ||
def _action_launch_procurement_rule(self, bom_line, dict): | ||
values = self._prepare_service_procurement_values() | ||
|
||
name = '%s for %s' % (bom_line.product_id.name, | ||
self.name) | ||
self.env['procurement.group'].sudo().run( | ||
bom_line.product_id, dict['qty'], | ||
bom_line.product_uom_id, | ||
self.location_src_id, name, | ||
name, values) | ||
return True | ||
|
||
@api.multi | ||
def _generate_moves(self): | ||
res = super()._generate_moves() | ||
for production in self: | ||
factor = production.product_uom_id._compute_quantity( | ||
production.product_qty, | ||
production.bom_id.product_uom_id | ||
) / production.bom_id.product_qty | ||
boms, lines = production.bom_id.explode( | ||
production.product_id, factor, | ||
picking_type=production.bom_id.picking_type_id) | ||
for line in lines: | ||
if line[0].product_id.type == 'service': | ||
production._action_launch_procurement_rule( | ||
line[0], line[1]) | ||
return res |
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,2 @@ | ||
* Jordi Ballester Alomar <jordi.ballester@eficent.com> | ||
* Rubén Dario Bravo <rubenred18@gmail.com> |
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,5 @@ | ||
Creates procurement orders from manufacturing orders, for services included | ||
in the Bill of Materials. | ||
|
||
This allows users to include additional services that are to be procured as | ||
part of the manufacturing process. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.