diff --git a/mrp_sale_info/README.rst b/mrp_sale_info/README.rst new file mode 100644 index 00000000000..b3202ec91be --- /dev/null +++ b/mrp_sale_info/README.rst @@ -0,0 +1,104 @@ +============= +MRP Sale Info +============= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7bc15546da74a5f8a2593bc0c088e56f9f996f09a0603847dac435c2488d9642 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/18.0/mrp_sale_info + :alt: OCA/manufacture +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/manufacture-18-0/manufacture-18-0-mrp_sale_info + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of Odoo for adding related fields +to Manufacturing Orders and Work Orders: + + - Sale order + - Customer + - Commitment Date + - Customer Reference + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +New fields are displayed in tree and in form views (Extra information +tab). + +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 +------- + +* AvanzOSC +* Tecnativa + +Contributors +------------ + +- `AvanzOsc `__: + + - Oihane Crucelaegui + - Ana Juaristi + +- `Tecnativa `__: + + - Antonio Espinosa + - Rafael Blasco + - Pedro M. Baeza + +- Rubén Bravo +- Kevin Khao +- Alex Comba +- Mantas Šniukas +- Heliconia Solutions Pvt. Ltd. + +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_sale_info/__init__.py b/mrp_sale_info/__init__.py new file mode 100644 index 00000000000..3ea0e1bf248 --- /dev/null +++ b/mrp_sale_info/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2019 Rubén Bravo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/mrp_sale_info/__manifest__.py b/mrp_sale_info/__manifest__.py new file mode 100644 index 00000000000..7f71fbea271 --- /dev/null +++ b/mrp_sale_info/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2019 Rubén Bravo +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + "name": "MRP Sale Info", + "summary": "Adds sale information to Manufacturing models", + "version": "18.0.1.0.0", + "category": "Manufacturing", + "website": "https://github.com/OCA/manufacture", + "author": "AvanzOSC, Tecnativa, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "mrp", + "sale_stock", + ], + "data": [ + "views/mrp_production.xml", + "views/mrp_workorder.xml", + ], +} diff --git a/mrp_sale_info/i18n/de.po b/mrp_sale_info/i18n/de.po new file mode 100644 index 00000000000..96594d0aaff --- /dev/null +++ b/mrp_sale_info/i18n/de.po @@ -0,0 +1,91 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +# Translators: +# Rudolf Schnapka , 2016 +msgid "" +msgstr "" +"Project-Id-Version: manufacture (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-14 11:03+0000\n" +"PO-Revision-Date: 2018-12-13 11:58+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-manufacture-9-0/" +"language/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" +"X-Generator: Weblate 3.3\n" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "Commitment Date" +msgstr "Zusagedatum" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__partner_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__partner_id +msgid "Customer" +msgstr "Kunde" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__client_order_ref +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__client_order_ref +msgid "Customer Reference" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workorder_form_view_inherit +msgid "Sale information" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__sale_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__sale_id +msgid "Sale order" +msgstr "Verkaufsauftrag" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__source_procurement_group_id +msgid "Source Procurement Group" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "" +"This is the delivery date promised to the customer. If set, the delivery " +"order will be scheduled based on this date rather than product lead times." +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder +msgid "Work Order" +msgstr "Arbeitsauftrag" + +#~ msgid "" +#~ "Date by which the products are sure to be delivered. This is a date that " +#~ "you can promise to the customer, based on the Product Lead Times." +#~ msgstr "" +#~ "Datum, zu dem die Produkte sicher geliefert werden können. Dieses Datum " +#~ "können Sie einem Kunden, basierend auf Vorlauf- und Lieferzeiten, zusagen." + +#~ msgid "Manufacturing Order" +#~ msgstr "Fertigungsauftrag" + +#~ msgid "Sale Information" +#~ msgstr "Verkaufsinformation" diff --git a/mrp_sale_info/i18n/es.po b/mrp_sale_info/i18n/es.po new file mode 100644 index 00000000000..aaac0933844 --- /dev/null +++ b/mrp_sale_info/i18n/es.po @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: manufacture (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-12 23:17+0000\n" +"PO-Revision-Date: 2023-07-10 10:08+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-manufacture-9-0/" +"language/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 4.17\n" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "Commitment Date" +msgstr "Fecha compromiso" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__partner_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__partner_id +msgid "Customer" +msgstr "Cliente" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__client_order_ref +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__client_order_ref +msgid "Customer Reference" +msgstr "Referencia del cliente" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Production Order" +msgstr "Orden de Producción" + +#. module: mrp_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workorder_form_view_inherit +msgid "Sale information" +msgstr "Información de venta" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__sale_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__sale_id +msgid "Sale order" +msgstr "Pedido de venta" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__source_procurement_group_id +msgid "Source Procurement Group" +msgstr "Origen de Grupo de Adquisiciones" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_stock_rule +msgid "Stock Rule" +msgstr "Regla de existencias" + +#. module: mrp_sale_info +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "" +"This is the delivery date promised to the customer. If set, the delivery " +"order will be scheduled based on this date rather than product lead times." +msgstr "" +"Es la fecha de entrega prometida al cliente. Si se establece, la orden de " +"entrega se programará en función de esta fecha y no de los plazos de entrega " +"del producto." + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder +msgid "Work Order" +msgstr "Orden de trabajo" + +#~ msgid "Display Name" +#~ msgstr "Nombre a Mostrar" + +#~ msgid "ID" +#~ msgstr "ID (identificación)" + +#~ msgid "Last Modified on" +#~ msgstr "modificado por última vez el" + +#~ msgid "" +#~ "Date by which the products are sure to be delivered. This is a date that " +#~ "you can promise to the customer, based on the Product Lead Times." +#~ msgstr "" +#~ "Fecha en la que se asegura que los productos estarán enviados. Esta es la " +#~ "fecha de compromiso con el cliente, basada en el tirmpo de entrega." + +#~ msgid "Manufacturing Order" +#~ msgstr "Orden de producción" + +#~ msgid "Sale Information" +#~ msgstr "Información de venta" diff --git a/mrp_sale_info/i18n/fr.po b/mrp_sale_info/i18n/fr.po new file mode 100644 index 00000000000..48bbb76a8e4 --- /dev/null +++ b/mrp_sale_info/i18n/fr.po @@ -0,0 +1,76 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: manufacture (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-07 07:44+0000\n" +"PO-Revision-Date: 2016-03-12 23:17+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-manufacture-9-0/" +"language/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" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "Commitment Date" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__partner_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__partner_id +msgid "Customer" +msgstr "Client" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__client_order_ref +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__client_order_ref +msgid "Customer Reference" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workorder_form_view_inherit +msgid "Sale information" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__sale_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__sale_id +msgid "Sale order" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__source_procurement_group_id +msgid "Source Procurement Group" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "" +"This is the delivery date promised to the customer. If set, the delivery " +"order will be scheduled based on this date rather than product lead times." +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder +msgid "Work Order" +msgstr "" diff --git a/mrp_sale_info/i18n/it.po b/mrp_sale_info/i18n/it.po new file mode 100644 index 00000000000..0d94d44223d --- /dev/null +++ b/mrp_sale_info/i18n/it.po @@ -0,0 +1,77 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.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_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "Commitment Date" +msgstr "Data impegno" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__partner_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__partner_id +msgid "Customer" +msgstr "Cliente" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__client_order_ref +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__client_order_ref +msgid "Customer Reference" +msgstr "Riferimento cliente" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Production Order" +msgstr "Ordine di produzione" + +#. module: mrp_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workorder_form_view_inherit +msgid "Sale information" +msgstr "Informazione vendita" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__sale_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__sale_id +msgid "Sale order" +msgstr "Ordine di vendita" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__source_procurement_group_id +msgid "Source Procurement Group" +msgstr "Gruppo acquisto sorgente" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_stock_rule +msgid "Stock Rule" +msgstr "Regola di giacenza" + +#. module: mrp_sale_info +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "" +"This is the delivery date promised to the customer. If set, the delivery " +"order will be scheduled based on this date rather than product lead times." +msgstr "" +"Questa è la data di consegna promessa al cliente. Se impostata, la data di " +"consegna dell'ordine verrà programmata in mase a questa data invice che ai " +"tempi di produzione." + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder +msgid "Work Order" +msgstr "Ordine di lavoro" diff --git a/mrp_sale_info/i18n/mrp_sale_info.pot b/mrp_sale_info/i18n/mrp_sale_info.pot new file mode 100644 index 00000000000..7ac6f7a8535 --- /dev/null +++ b/mrp_sale_info/i18n/mrp_sale_info.pot @@ -0,0 +1,71 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.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_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "Commitment Date" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__partner_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__partner_id +msgid "Customer" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__client_order_ref +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__client_order_ref +msgid "Customer Reference" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workorder_form_view_inherit +msgid "Sale information" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__sale_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__sale_id +msgid "Sale order" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__source_procurement_group_id +msgid "Source Procurement Group" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "" +"This is the delivery date promised to the customer. If set, the delivery " +"order will be scheduled based on this date rather than product lead times." +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder +msgid "Work Order" +msgstr "" diff --git a/mrp_sale_info/i18n/pt_BR.po b/mrp_sale_info/i18n/pt_BR.po new file mode 100644 index 00000000000..8a096f38e2c --- /dev/null +++ b/mrp_sale_info/i18n/pt_BR.po @@ -0,0 +1,101 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +# Translators: +# Claudio Araujo Santos , 2016 +msgid "" +msgstr "" +"Project-Id-Version: manufacture (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-03 06:08+0000\n" +"PO-Revision-Date: 2021-03-15 07:45+0000\n" +"Last-Translator: Marcel Savegnago \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-" +"manufacture-9-0/language/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 4.3.2\n" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "Commitment Date" +msgstr "Compromisso Data" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__partner_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__partner_id +msgid "Customer" +msgstr "Cliente" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__client_order_ref +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__client_order_ref +msgid "Customer Reference" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Production Order" +msgstr "Ordem de Produção" + +#. module: mrp_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workorder_form_view_inherit +msgid "Sale information" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__sale_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__sale_id +msgid "Sale order" +msgstr "Ordem de venda" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__source_procurement_group_id +msgid "Source Procurement Group" +msgstr "Fonte do Grupo de Aquisição" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_stock_rule +msgid "Stock Rule" +msgstr "Regra de Estoque" + +#. module: mrp_sale_info +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "" +"This is the delivery date promised to the customer. If set, the delivery " +"order will be scheduled based on this date rather than product lead times." +msgstr "" +"Esta é a data de entrega prometida ao cliente. Se definido, o pedido de " +"entrega será agendado com base nesta data, em vez de prazos de lead time do " +"produto." + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder +msgid "Work Order" +msgstr "Ordem de Trabalho" + +#~ msgid "" +#~ "You can find a customer by its Name, TIN, Email or Internal Reference." +#~ msgstr "" +#~ "Você pode encontrar um cliente pelo nome, TIN, E-mail ou Referência " +#~ "Interna." + +#~ msgid "" +#~ "Date by which the products are sure to be delivered. This is a date that " +#~ "you can promise to the customer, based on the Product Lead Times." +#~ msgstr "" +#~ "Data em que os produtos estão certos para serem entregues. Esta é uma " +#~ "data que você pode prometer para o cliente, com base nos prazos de " +#~ "entrega do produto." + +#~ msgid "Manufacturing Order" +#~ msgstr "Ordem de fabricação" + +#~ msgid "Sale Information" +#~ msgstr "Informações venda" diff --git a/mrp_sale_info/i18n/zh_CN.po b/mrp_sale_info/i18n/zh_CN.po new file mode 100644 index 00000000000..f18d3794bfc --- /dev/null +++ b/mrp_sale_info/i18n/zh_CN.po @@ -0,0 +1,83 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +# Translators: +# Jeffery Chenn , 2016 +msgid "" +msgstr "" +"Project-Id-Version: manufacture (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-07 07:44+0000\n" +"PO-Revision-Date: 2016-09-04 05:46+0000\n" +"Last-Translator: Jeffery Chenn \n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-" +"manufacture-9-0/language/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" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "Commitment Date" +msgstr "提交日期" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__partner_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__partner_id +msgid "Customer" +msgstr "客户" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__client_order_ref +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__client_order_ref +msgid "Customer Reference" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workorder_form_view_inherit +msgid "Sale information" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__sale_id +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_workorder__sale_id +msgid "Sale order" +msgstr "销售订单" + +#. module: mrp_sale_info +#: model:ir.model.fields,field_description:mrp_sale_info.field_mrp_production__source_procurement_group_id +msgid "Source Procurement Group" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production__commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder__commitment_date +msgid "" +"This is the delivery date promised to the customer. If set, the delivery " +"order will be scheduled based on this date rather than product lead times." +msgstr "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder +msgid "Work Order" +msgstr "工单" + +#~ msgid "Manufacturing Order" +#~ msgstr "制造订单" + +#~ msgid "Sale Information" +#~ msgstr "销售信息" diff --git a/mrp_sale_info/models/__init__.py b/mrp_sale_info/models/__init__.py new file mode 100644 index 00000000000..ab9fed971b4 --- /dev/null +++ b/mrp_sale_info/models/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import mrp_production +from . import mrp_workorder +from . import stock_rule diff --git a/mrp_sale_info/models/mrp_production.py b/mrp_sale_info/models/mrp_production.py new file mode 100644 index 00000000000..57c0f7d1ca2 --- /dev/null +++ b/mrp_sale_info/models/mrp_production.py @@ -0,0 +1,34 @@ +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2019 Rubén Bravo +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + source_procurement_group_id = fields.Many2one( + comodel_name="procurement.group", + readonly=True, + ) + sale_id = fields.Many2one( + comodel_name="sale.order", + string="Sale order", + readonly=True, + store=True, + related="source_procurement_group_id.sale_id", + ) + partner_id = fields.Many2one( + comodel_name="res.partner", + related="sale_id.partner_id", + string="Customer", + store=True, + ) + commitment_date = fields.Datetime( + related="sale_id.commitment_date", string="Commitment Date", store=True + ) + client_order_ref = fields.Char( + related="sale_id.client_order_ref", string="Customer Reference", store=True + ) diff --git a/mrp_sale_info/models/mrp_workorder.py b/mrp_sale_info/models/mrp_workorder.py new file mode 100644 index 00000000000..c4c278d08d7 --- /dev/null +++ b/mrp_sale_info/models/mrp_workorder.py @@ -0,0 +1,25 @@ +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2019 Rubén Bravo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class MrpWorkorder(models.Model): + _inherit = "mrp.workorder" + + sale_id = fields.Many2one( + related="production_id.sale_id", string="Sale order", readonly=True, store=True + ) + partner_id = fields.Many2one( + related="sale_id.partner_id", readonly=True, string="Customer", store=True + ) + commitment_date = fields.Datetime( + related="sale_id.commitment_date", + string="Commitment Date", + store=True, + readonly=True, + ) + client_order_ref = fields.Char( + related="sale_id.client_order_ref", string="Customer Reference", store=True + ) diff --git a/mrp_sale_info/models/stock_rule.py b/mrp_sale_info/models/stock_rule.py new file mode 100644 index 00000000000..207cd0ade92 --- /dev/null +++ b/mrp_sale_info/models/stock_rule.py @@ -0,0 +1,37 @@ +# Copyright 2019 Rubén Bravo +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) + +from odoo import models + + +class StockRule(models.Model): + _inherit = "stock.rule" + + def _prepare_mo_vals( + self, + product_id, + product_qty, + product_uom, + location_id, + name, + origin, + company_id, + values, + bom, + ): + res = super()._prepare_mo_vals( + product_id, + product_qty, + product_uom, + location_id, + name, + origin, + company_id, + values, + bom, + ) + res["source_procurement_group_id"] = ( + values.get("group_id").id if values.get("group_id", False) else False + ) + return res diff --git a/mrp_sale_info/pyproject.toml b/mrp_sale_info/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/mrp_sale_info/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/mrp_sale_info/readme/CONTRIBUTORS.md b/mrp_sale_info/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..f81d3313e9d --- /dev/null +++ b/mrp_sale_info/readme/CONTRIBUTORS.md @@ -0,0 +1,12 @@ +- [AvanzOsc](http://www.avanzosc.es): + - Oihane Crucelaegui \<\> + - Ana Juaristi \<\> +- [Tecnativa](https://www.tecnativa.com): + - Antonio Espinosa + - Rafael Blasco + - Pedro M. Baeza +- Rubén Bravo \<\> +- Kevin Khao \<\> +- Alex Comba \<\> +- Mantas Šniukas \<\> +- Heliconia Solutions Pvt. Ltd. \<\> diff --git a/mrp_sale_info/readme/DESCRIPTION.md b/mrp_sale_info/readme/DESCRIPTION.md new file mode 100644 index 00000000000..215486f27c4 --- /dev/null +++ b/mrp_sale_info/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This module extends the functionality of Odoo for adding related fields +to Manufacturing Orders and Work Orders: + +> - Sale order +> - Customer +> - Commitment Date +> - Customer Reference diff --git a/mrp_sale_info/readme/USAGE.md b/mrp_sale_info/readme/USAGE.md new file mode 100644 index 00000000000..36ba622037c --- /dev/null +++ b/mrp_sale_info/readme/USAGE.md @@ -0,0 +1,2 @@ +New fields are displayed in tree and in form views (Extra information +tab). diff --git a/mrp_sale_info/static/description/icon.png b/mrp_sale_info/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/mrp_sale_info/static/description/icon.png differ diff --git a/mrp_sale_info/static/description/index.html b/mrp_sale_info/static/description/index.html new file mode 100644 index 00000000000..691b273f4e8 --- /dev/null +++ b/mrp_sale_info/static/description/index.html @@ -0,0 +1,454 @@ + + + + + +MRP Sale Info + + + +
+

MRP Sale Info

+ + +

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

+

This module extends the functionality of Odoo for adding related fields +to Manufacturing Orders and Work Orders:

+
+
    +
  • Sale order
  • +
  • Customer
  • +
  • Commitment Date
  • +
  • Customer Reference
  • +
+
+

Table of contents

+ +
+

Usage

+

New fields are displayed in tree and in form views (Extra information +tab).

+
+
+

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

+
    +
  • AvanzOSC
  • +
  • Tecnativa
  • +
+
+
+

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_sale_info/tests/__init__.py b/mrp_sale_info/tests/__init__.py new file mode 100644 index 00000000000..b73700e8c6e --- /dev/null +++ b/mrp_sale_info/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_mrp_sale_info diff --git a/mrp_sale_info/tests/test_mrp_sale_info.py b/mrp_sale_info/tests/test_mrp_sale_info.py new file mode 100644 index 00000000000..a526be6db92 --- /dev/null +++ b/mrp_sale_info/tests/test_mrp_sale_info.py @@ -0,0 +1,79 @@ +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo.tests import common + + +class TestMrpSaleInfo(common.TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + route_manufacture_1 = cls.env.ref("mrp.route_warehouse0_manufacture") + route_manufacture_2 = cls.env.ref("stock.route_warehouse0_mto") + route_manufacture_2.active = True + cls.product = cls.env["product.product"].create( + [ + { + "name": "Test mrp_sale_info product", + "type": "consu", + "route_ids": [ + (4, route_manufacture_1.id), + (4, route_manufacture_2.id), + ], + } + ] + ) + cls.bom = cls.env["mrp.bom"].create( + [ + { + "product_tmpl_id": cls.product.product_tmpl_id.id, + "operation_ids": [ + ( + 0, + 0, + { + "name": "Test operation", + "workcenter_id": cls.env.ref("mrp.mrp_workcenter_3").id, + }, + ) + ], + } + ] + ) + cls.partner = cls.env["res.partner"].create({"name": "Test client"}) + cls.sale_order = cls.env["sale.order"].create( + [ + { + "partner_id": cls.partner.id, + "client_order_ref": "SO1", + "order_line": [ + ( + 0, + 0, + { + "product_id": cls.product.id, + "product_uom_qty": 1, + "price_unit": 1, + }, + ), + ], + } + ] + ) + + def test_mrp_sale_info(self): + prev_productions = self.env["mrp.production"].search([]) + self.sale_order.action_confirm() + production = self.env["mrp.production"].search([]) - prev_productions + self.assertEqual(production.sale_id, self.sale_order) + self.assertEqual(production.partner_id, self.partner) + self.assertEqual(production.client_order_ref, self.sale_order.client_order_ref) + + def test_mrp_workorder(self): + prev_workorders = self.env["mrp.workorder"].search([]) + self.sale_order.action_confirm() + workorder = ( + self.env["mrp.production"].search([]).workorder_ids - prev_workorders + ) + self.assertEqual(workorder.sale_id, self.sale_order) + self.assertEqual(workorder.partner_id, self.partner) + self.assertEqual(workorder.client_order_ref, self.sale_order.client_order_ref) diff --git a/mrp_sale_info/views/mrp_production.xml b/mrp_sale_info/views/mrp_production.xml new file mode 100644 index 00000000000..427c582cafb --- /dev/null +++ b/mrp_sale_info/views/mrp_production.xml @@ -0,0 +1,32 @@ + + + + MRP Production Form with Sale Order + mrp.production + + + + + + + + + + + + + + + MRP Production Tree with Sale Order + mrp.production + + + + + + + + + + + diff --git a/mrp_sale_info/views/mrp_workorder.xml b/mrp_sale_info/views/mrp_workorder.xml new file mode 100644 index 00000000000..d887494346b --- /dev/null +++ b/mrp_sale_info/views/mrp_workorder.xml @@ -0,0 +1,44 @@ + + + + MRP Work Order Tree with Sale Order + mrp.workorder + + + + + + + + + + + + + MRP Work Order Form with Sale Order + mrp.workorder + + + + + + + + + + + + + + + + + +