diff --git a/mrp_auto_assign/README.rst b/mrp_auto_assign/README.rst new file mode 100644 index 000000000..8f1c34139 --- /dev/null +++ b/mrp_auto_assign/README.rst @@ -0,0 +1,96 @@ +=============== +Mrp Auto Assign +=============== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:276050fc7d5e77ab8d2b2d6ed43d1e3d3547da369c89f0004d8a400a56b4c4ea + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/14.0/mrp_auto_assign + :alt: OCA/manufacture +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_auto_assign + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Simple module that make MO to reserve the raw material moves automatically +at confirmation. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Go to *Manufacturing* and create and confirm a Manufacturing Order. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/129/12.0 + +Known issues / Roadmap +====================== + +This module is not needed in higher versions, as in V15 Odoo introduces the +option to decide how stock moves should be assigned based on the operation type. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Akretion + +Contributors +~~~~~~~~~~~~ + +* Florian da Costa +* Sudhir Arya +* Jordi Masvidal + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mrp_auto_assign/__init__.py b/mrp_auto_assign/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_auto_assign/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_auto_assign/__manifest__.py b/mrp_auto_assign/__manifest__.py new file mode 100644 index 000000000..aef12b0d6 --- /dev/null +++ b/mrp_auto_assign/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright (C) 2017 Akretion (http://www.akretion.com). All Rights Reserved +# @author Florian DA COSTA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Mrp Auto Assign", + "summary": "Make MO automatically reserve raw material moves at creation", + "author": "Akretion, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/manufacture", + "category": "Manufacturing", + "version": "14.0.1.0.0", + "license": "AGPL-3", + "depends": ["mrp"], + "application": False, + "installable": True, +} diff --git a/mrp_auto_assign/i18n/de.po b/mrp_auto_assign/i18n/de.po new file mode 100644 index 000000000..0678b6bd6 --- /dev/null +++ b/mrp_auto_assign/i18n/de.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2017-11-28 03:44+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\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" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Fertigungsautrag" diff --git a/mrp_auto_assign/i18n/es.po b/mrp_auto_assign/i18n/es.po new file mode 100644 index 000000000..65f075196 --- /dev/null +++ b/mrp_auto_assign/i18n/es.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2019-10-11 18:37+0000\n" +"Last-Translator: layadelcarmen \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\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.8\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "Orden de producción" diff --git a/mrp_auto_assign/i18n/es_MX.po b/mrp_auto_assign/i18n/es_MX.po new file mode 100644 index 000000000..18c89a6ed --- /dev/null +++ b/mrp_auto_assign/i18n/es_MX.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2018-02-12 03:48+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/" +"es_MX/)\n" +"Language: es_MX\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" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Orden de fabricación" diff --git a/mrp_auto_assign/i18n/fr.po b/mrp_auto_assign/i18n/fr.po new file mode 100644 index 000000000..1d6a75711 --- /dev/null +++ b/mrp_auto_assign/i18n/fr.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# Quentin THEURET , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2020-04-04 12:19+0000\n" +"Last-Translator: Yann Papouin \n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\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.10\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "Ordre de production" diff --git a/mrp_auto_assign/i18n/gl.po b/mrp_auto_assign/i18n/gl.po new file mode 100644 index 000000000..bf1906613 --- /dev/null +++ b/mrp_auto_assign/i18n/gl.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2018-02-12 03:48+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n" +"Language: gl\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" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Orde de fabricación" diff --git a/mrp_auto_assign/i18n/hr.po b/mrp_auto_assign/i18n/hr.po new file mode 100644 index 000000000..95b283e46 --- /dev/null +++ b/mrp_auto_assign/i18n/hr.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2019-12-04 14:04+0000\n" +"Last-Translator: Bole \n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 3.9.1\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "Proizvodni nalog" diff --git a/mrp_auto_assign/i18n/hr_HR.po b/mrp_auto_assign/i18n/hr_HR.po new file mode 100644 index 000000000..fe7769b73 --- /dev/null +++ b/mrp_auto_assign/i18n/hr_HR.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2017-11-28 03:44+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_HR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Proizvodni nalog" diff --git a/mrp_auto_assign/i18n/it.po b/mrp_auto_assign/i18n/it.po new file mode 100644 index 000000000..075e8bd4f --- /dev/null +++ b/mrp_auto_assign/i18n/it.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-05-15 19:34+0000\n" +"Last-Translator: Francesco Foresti \n" +"Language-Team: none\n" +"Language: it\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 4.14.1\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "Ordine di produzione" diff --git a/mrp_auto_assign/i18n/lt.po b/mrp_auto_assign/i18n/lt.po new file mode 100644 index 000000000..5ad29e0db --- /dev/null +++ b/mrp_auto_assign/i18n/lt.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# Viktoras Norkus , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-16 08:02+0000\n" +"PO-Revision-Date: 2018-01-16 08:02+0000\n" +"Last-Translator: Viktoras Norkus , 2018\n" +"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" +"%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Gamybos užsakymas" diff --git a/mrp_auto_assign/i18n/mrp_auto_assign.pot b/mrp_auto_assign/i18n/mrp_auto_assign.pot new file mode 100644 index 000000000..c5eff42c4 --- /dev/null +++ b/mrp_auto_assign/i18n/mrp_auto_assign.pot @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.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_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "" + diff --git a/mrp_auto_assign/i18n/nl_NL.po b/mrp_auto_assign/i18n/nl_NL.po new file mode 100644 index 000000000..892151ad1 --- /dev/null +++ b/mrp_auto_assign/i18n/nl_NL.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2017-11-28 03:44+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\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" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Productieorder" diff --git a/mrp_auto_assign/i18n/pt_BR.po b/mrp_auto_assign/i18n/pt_BR.po new file mode 100644 index 000000000..87bc06b9b --- /dev/null +++ b/mrp_auto_assign/i18n/pt_BR.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2020-06-22 02:19+0000\n" +"Last-Translator: Fernando Colus \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\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.10\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "Ordem de Produção" diff --git a/mrp_auto_assign/i18n/ro.po b/mrp_auto_assign/i18n/ro.po new file mode 100644 index 000000000..1bab80436 --- /dev/null +++ b/mrp_auto_assign/i18n/ro.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2018-02-12 03:48+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Comandă fabricație" diff --git a/mrp_auto_assign/i18n/sl.po b/mrp_auto_assign/i18n/sl.po new file mode 100644 index 000000000..6a591c59b --- /dev/null +++ b/mrp_auto_assign/i18n/sl.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2020-03-30 22:14+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 3.10\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "Proizvodni nalog" diff --git a/mrp_auto_assign/i18n/tr.po b/mrp_auto_assign/i18n/tr.po new file mode 100644 index 000000000..b8c108d15 --- /dev/null +++ b/mrp_auto_assign/i18n/tr.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2021-09-24 09:34+0000\n" +"Last-Translator: Yiğit \n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"Language: tr\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 4.3.2\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "Üretim Emri" diff --git a/mrp_auto_assign/i18n/vi_VN.po b/mrp_auto_assign/i18n/vi_VN.po new file mode 100644 index 000000000..aee0fc4c3 --- /dev/null +++ b/mrp_auto_assign/i18n/vi_VN.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2018-02-12 03:48+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Vietnamese (Viet Nam) (https://www.transifex.com/oca/" +"teams/23907/vi_VN/)\n" +"Language: vi_VN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +#, fuzzy +msgid "Production Order" +msgstr "Lệnh sản xuất" diff --git a/mrp_auto_assign/i18n/zh_CN.po b/mrp_auto_assign/i18n/zh_CN.po new file mode 100644 index 000000000..a5bcde25d --- /dev/null +++ b/mrp_auto_assign/i18n/zh_CN.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_auto_assign +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2019-09-09 15:24+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/" +"zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: mrp_auto_assign +#: model:ir.model,name:mrp_auto_assign.model_mrp_production +msgid "Production Order" +msgstr "生产单" diff --git a/mrp_auto_assign/models/__init__.py b/mrp_auto_assign/models/__init__.py new file mode 100644 index 000000000..a9e5f13e4 --- /dev/null +++ b/mrp_auto_assign/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_production diff --git a/mrp_auto_assign/models/mrp_production.py b/mrp_auto_assign/models/mrp_production.py new file mode 100644 index 000000000..d422fd0b1 --- /dev/null +++ b/mrp_auto_assign/models/mrp_production.py @@ -0,0 +1,16 @@ +# Copyright (C) 2017 Akretion (http://www.akretion.com). All Rights Reserved +# @author Florian DA COSTA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + def action_confirm(self): + res = super(MrpProduction, self).action_confirm() + to_assign = self.filtered(lambda p: p.reservation_state) + if to_assign: + to_assign.action_assign() + return res diff --git a/mrp_auto_assign/readme/CONTRIBUTORS.rst b/mrp_auto_assign/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..032eb58f3 --- /dev/null +++ b/mrp_auto_assign/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Florian da Costa +* Sudhir Arya +* Jordi Masvidal diff --git a/mrp_auto_assign/readme/DESCRIPTION.rst b/mrp_auto_assign/readme/DESCRIPTION.rst new file mode 100644 index 000000000..b172d0fc0 --- /dev/null +++ b/mrp_auto_assign/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Simple module that make MO to reserve the raw material moves automatically +at confirmation. diff --git a/mrp_auto_assign/readme/ROADMAP.rst b/mrp_auto_assign/readme/ROADMAP.rst new file mode 100644 index 000000000..e77303289 --- /dev/null +++ b/mrp_auto_assign/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +This module is not needed in higher versions, as in V15 Odoo introduces the +option to decide how stock moves should be assigned based on the operation type. diff --git a/mrp_auto_assign/readme/USAGE.rst b/mrp_auto_assign/readme/USAGE.rst new file mode 100644 index 000000000..666ad8840 --- /dev/null +++ b/mrp_auto_assign/readme/USAGE.rst @@ -0,0 +1,7 @@ +To use this module, you need to: + +#. Go to *Manufacturing* and create and confirm a Manufacturing Order. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/129/12.0 diff --git a/mrp_auto_assign/static/description/icon.png b/mrp_auto_assign/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/mrp_auto_assign/static/description/icon.png differ diff --git a/mrp_auto_assign/static/description/index.html b/mrp_auto_assign/static/description/index.html new file mode 100644 index 000000000..a6faecc2f --- /dev/null +++ b/mrp_auto_assign/static/description/index.html @@ -0,0 +1,438 @@ + + + + + +Mrp Auto Assign + + + +
+

Mrp Auto Assign

+ + +

Beta License: AGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

+

Simple module that make MO to reserve the raw material moves automatically +at confirmation.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to Manufacturing and create and confirm a Manufacturing Order.
  2. +
+Try me on Runbot +
+
+

Known issues / Roadmap

+

This module is not needed in higher versions, as in V15 Odoo introduces the +option to decide how stock moves should be assigned based on the operation type.

+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/mrp_auto_assign/tests/__init__.py b/mrp_auto_assign/tests/__init__.py new file mode 100644 index 000000000..4b002ea91 --- /dev/null +++ b/mrp_auto_assign/tests/__init__.py @@ -0,0 +1 @@ +from . import test_auto_assign diff --git a/mrp_auto_assign/tests/test_auto_assign.py b/mrp_auto_assign/tests/test_auto_assign.py new file mode 100644 index 000000000..b2bb0b812 --- /dev/null +++ b/mrp_auto_assign/tests/test_auto_assign.py @@ -0,0 +1,78 @@ +# Copyright (C) 2017 Akretion (http://www.akretion.com). All Rights Reserved +# @author Florian DA COSTA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests import Form +from odoo.tests.common import TransactionCase + + +class TestMrpAutoAssign(TransactionCase): + def setUp(self, *args, **kwargs): + super(TestMrpAutoAssign, self).setUp(*args, **kwargs) + self.production_model = self.env["mrp.production"] + self.bom_model = self.env["mrp.bom"] + self.stock_location_stock = self.env.ref("stock.stock_location_stock") + self.manufacture_route = self.env.ref("mrp.route_warehouse0_manufacture") + self.uom_unit = self.env.ref("uom.product_uom_unit") + + self.product_manuf = self.env["product.product"].create( + { + "name": "Manuf", + "type": "product", + "uom_id": self.uom_unit.id, + "route_ids": [(4, self.manufacture_route.id)], + } + ) + self.product_raw_material = self.env["product.product"].create( + { + "name": "Raw Material", + "type": "product", + "uom_id": self.uom_unit.id, + } + ) + + self._update_product_qty( + self.product_raw_material, self.stock_location_stock, 1 + ) + + self.bom = self.env["mrp.bom"].create( + { + "product_id": self.product_manuf.id, + "product_tmpl_id": self.product_manuf.product_tmpl_id.id, + "type": "normal", + "bom_line_ids": ( + [ + ( + 0, + 0, + { + "product_id": self.product_raw_material.id, + "product_qty": 1, + "product_uom_id": self.uom_unit.id, + }, + ), + ] + ), + } + ) + + def _update_product_qty(self, product, location, quantity): + """Update Product quantity.""" + product_qty = self.env["stock.quant"].create( + { + "location_id": location.id, + "product_id": product.id, + "quantity": quantity, + } + ) + return product_qty + + def test_01_manufacture_auto_assign(self): + """Test if Manufacturing order is auto-assigned.""" + mo_form = Form(self.env["mrp.production"]) + mo_form.product_id = self.product_manuf + mo_form.bom_id = self.bom + mo_form.product_qty = 1 + production = mo_form.save() + production.action_confirm() + self.assertEqual(production.reservation_state, "assigned") diff --git a/setup/mrp_auto_assign/odoo/addons/mrp_auto_assign b/setup/mrp_auto_assign/odoo/addons/mrp_auto_assign new file mode 120000 index 000000000..c5f7605c9 --- /dev/null +++ b/setup/mrp_auto_assign/odoo/addons/mrp_auto_assign @@ -0,0 +1 @@ +../../../../mrp_auto_assign \ No newline at end of file diff --git a/setup/mrp_auto_assign/setup.py b/setup/mrp_auto_assign/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_auto_assign/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)