diff --git a/mrp_production_quant_manual_assign/README.rst b/mrp_production_quant_manual_assign/README.rst new file mode 100644 index 000000000..75ea0be32 --- /dev/null +++ b/mrp_production_quant_manual_assign/README.rst @@ -0,0 +1,94 @@ +==================================== +Production - Manual Quant Assignment +==================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/14.0/mrp_production_quant_manual_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_production_quant_manual_assign + :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/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to manually select quants for components of the +manufacturing order. + +The module depends on `stock_quant_manual_assign ` +module. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Open a manufacturing order. +#. Click on the tag icon next to Reserved Quantity of a move line, which opens + a wizard for manually selecting quants. +#. Select quants and update quantities to assign (reserve), then Confirm. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Quartile Limited +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* `Quartile Limited `_: + + * Yoshi Tashiro + +* `ForgeFlow `_: + + * Lois Rilo + +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_production_quant_manual_assign/__init__.py b/mrp_production_quant_manual_assign/__init__.py new file mode 100644 index 000000000..976591c99 --- /dev/null +++ b/mrp_production_quant_manual_assign/__init__.py @@ -0,0 +1,2 @@ +from . import wizards +from . import models diff --git a/mrp_production_quant_manual_assign/__manifest__.py b/mrp_production_quant_manual_assign/__manifest__.py new file mode 100644 index 000000000..468acf169 --- /dev/null +++ b/mrp_production_quant_manual_assign/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2021 Quartile Limited +# Copyright 2021 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "Production - Manual Quant Assignment", + "version": "15.0.1.0.0", + "category": "Manufacturing", + "license": "AGPL-3", + "author": "Quartile Limited, ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/manufacture", + "depends": ["mrp", "stock_quant_manual_assign"], + "data": ["views/mrp_production_views.xml", "wizards/assign_manual_quants_view.xml"], + "installable": True, +} diff --git a/mrp_production_quant_manual_assign/i18n/mrp_production_quant_manual_assign.pot b/mrp_production_quant_manual_assign/i18n/mrp_production_quant_manual_assign.pot new file mode 100644 index 000000000..b5c3f0a1d --- /dev/null +++ b/mrp_production_quant_manual_assign/i18n/mrp_production_quant_manual_assign.pot @@ -0,0 +1,70 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_quant_manual_assign +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.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_quant_manual_assign +#: model:ir.model,name:mrp_production_quant_manual_assign.model_assign_manual_quants +msgid "Assign Manual Quants" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model,name:mrp_production_quant_manual_assign.model_assign_manual_quants_lines +msgid "Assign Manual Quants Lines" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants__display_name +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants_lines__display_name +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_stock_move__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants__id +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants_lines__id +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_stock_move__id +msgid "ID" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants__is_production_single_lot +msgid "Is Production Single Lot" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants____last_update +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants_lines____last_update +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_stock_move____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model_terms:ir.ui.view,arch_db:mrp_production_quant_manual_assign.mrp_production_form_view +msgid "Manual Quants" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants_lines__qty_done +msgid "Qty Done" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model,name:mrp_production_quant_manual_assign.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: mrp_production_quant_manual_assign +#: model:ir.model.fields,field_description:mrp_production_quant_manual_assign.field_assign_manual_quants_lines__to_consume_now +msgid "To Consume Now" +msgstr "" diff --git a/mrp_production_quant_manual_assign/i18n/pt_BR.po b/mrp_production_quant_manual_assign/i18n/pt_BR.po new file mode 100644 index 000000000..741e863de --- /dev/null +++ b/mrp_production_quant_manual_assign/i18n/pt_BR.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_quant_manual_assign +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-03-15 07:45+0000\n" +"Last-Translator: Marcel Savegnago \n" +"Language-Team: none\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 4.3.2\n" + +#. module: mrp_production_quant_manual_assign +#: model_terms:ir.ui.view,arch_db:mrp_production_quant_manual_assign.mrp_production_form_view +msgid "Manual Quants" +msgstr "Quantidades Manuais" diff --git a/mrp_production_quant_manual_assign/models/__init__.py b/mrp_production_quant_manual_assign/models/__init__.py new file mode 100644 index 000000000..6bda2d242 --- /dev/null +++ b/mrp_production_quant_manual_assign/models/__init__.py @@ -0,0 +1 @@ +from . import stock_move diff --git a/mrp_production_quant_manual_assign/models/stock_move.py b/mrp_production_quant_manual_assign/models/stock_move.py new file mode 100644 index 000000000..dec00e10b --- /dev/null +++ b/mrp_production_quant_manual_assign/models/stock_move.py @@ -0,0 +1,19 @@ +# Copyright 2021 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo import models +from odoo.tools.float_utils import float_is_zero + + +class StockMove(models.Model): + _inherit = "stock.move" + + # While https://github.com/odoo/odoo/pull/74268 is not closed. + def _should_bypass_set_qty_producing(self): + res = super()._should_bypass_set_qty_producing() + if self.has_tracking != "none" and float_is_zero( + self.quantity_done, precision_rounding=self.product_uom.rounding + ): + # If some serial/lot has been selected to be consumed we don't change the selection. + return False + return res diff --git a/mrp_production_quant_manual_assign/readme/CONTRIBUTORS.rst b/mrp_production_quant_manual_assign/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..cc55b7795 --- /dev/null +++ b/mrp_production_quant_manual_assign/readme/CONTRIBUTORS.rst @@ -0,0 +1,7 @@ +* `Quartile Limited `_: + + * Yoshi Tashiro + +* `ForgeFlow `_: + + * Lois Rilo diff --git a/mrp_production_quant_manual_assign/readme/DESCRIPTION.rst b/mrp_production_quant_manual_assign/readme/DESCRIPTION.rst new file mode 100644 index 000000000..8a779fc1a --- /dev/null +++ b/mrp_production_quant_manual_assign/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This module allows you to manually select quants for components of the +manufacturing order. + +The module depends on `stock_quant_manual_assign ` +module. diff --git a/mrp_production_quant_manual_assign/readme/USAGE.rst b/mrp_production_quant_manual_assign/readme/USAGE.rst new file mode 100644 index 000000000..12ad59d95 --- /dev/null +++ b/mrp_production_quant_manual_assign/readme/USAGE.rst @@ -0,0 +1,6 @@ +To use this module, you need to: + +#. Open a manufacturing order. +#. Click on the tag icon next to Reserved Quantity of a move line, which opens + a wizard for manually selecting quants. +#. Select quants and update quantities to assign (reserve), then Confirm. diff --git a/mrp_production_quant_manual_assign/static/description/icon.png b/mrp_production_quant_manual_assign/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/mrp_production_quant_manual_assign/static/description/icon.png differ diff --git a/mrp_production_quant_manual_assign/static/description/index.html b/mrp_production_quant_manual_assign/static/description/index.html new file mode 100644 index 000000000..844ac195f --- /dev/null +++ b/mrp_production_quant_manual_assign/static/description/index.html @@ -0,0 +1,441 @@ + + + + + + +Production - Manual Quant Assignment + + + +
+

Production - Manual Quant Assignment

+ + +

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

+

This module allows you to manually select quants for components of the +manufacturing order.

+

The module depends on stock_quant_manual_assign <https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_quant_manual_assign> +module.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Open a manufacturing order.
  2. +
  3. Click on the tag icon next to Reserved Quantity of a move line, which opens +a wizard for manually selecting quants.
  4. +
  5. Select quants and update quantities to assign (reserve), then Confirm.
  6. +
+
+
+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Quartile Limited
  • +
  • ForgeFlow
  • +
+
+
+

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_production_quant_manual_assign/views/mrp_production_views.xml b/mrp_production_quant_manual_assign/views/mrp_production_views.xml new file mode 100644 index 000000000..e47c88923 --- /dev/null +++ b/mrp_production_quant_manual_assign/views/mrp_production_views.xml @@ -0,0 +1,23 @@ + + + + mrp.production.form + mrp.production + + + +