diff --git a/mrp_sale_info/README.rst b/mrp_sale_info/README.rst index 20a237040..248ced437 100644 --- a/mrp_sale_info/README.rst +++ b/mrp_sale_info/README.rst @@ -19,7 +19,7 @@ New fields are displayed in tree and in form views (Extra information tab). .. 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/9.0 + :target: https://runbot.odoo-community.org/runbot/129/11.0 Bug Tracker =========== @@ -31,7 +31,7 @@ help us smashing it by providing a detailed and welcomed `feedback `_. +11.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. Credits ======= @@ -47,9 +47,9 @@ Contributors * Rafael Blasco * Antonio Espinosa * Javier Iniesta -* Oihane Crucelaegui ", -* Pedro M. Baeza ", -* Ana Juaristi " +* Oihane Crucelaegui +* Pedro M. Baeza +* Ana Juaristi * Victor M. Martin Maintainer diff --git a/mrp_sale_info/__init__.py b/mrp_sale_info/__init__.py index 51736d4ae..8018c4c84 100644 --- a/mrp_sale_info/__init__.py +++ b/mrp_sale_info/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/mrp_sale_info/__openerp__.py b/mrp_sale_info/__manifest__.py similarity index 50% rename from mrp_sale_info/__openerp__.py rename to mrp_sale_info/__manifest__.py index f866c8c63..67d2a6dfe 100644 --- a/mrp_sale_info/__openerp__.py +++ b/mrp_sale_info/__manifest__.py @@ -1,28 +1,26 @@ -# -*- coding: utf-8 -*- -# © 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta # 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": "9.0.1.0.0", + "version": "11.0.1.0.0", "category": "Manufacturing", - "website": "http://www.antiun.com", - "author": "Antiun Ingeniería S.L., " - "OdooMRP team, " - "AvanzOSC, " - "Serv. Tecnol. Avanzados - Pedro M. Baeza, " + "website": "https://github.com/oca/manufacture", + "author": "AvanzOSC, " + "Tecnativa, " "Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, - "installable": True, + 'installable': True, "depends": [ - "mrp_operations", + "mrp", "sale_mrp", "sale_order_dates", - "stock" + "stock", + "sale_stock", ], "data": [ "views/mrp_production.xml", - "views/mrp_production_workcenter_line.xml" + "views/mrp_workorder.xml", ] } diff --git a/mrp_sale_info/i18n/de.po b/mrp_sale_info/i18n/de.po index 5011994ba..c014e4672 100644 --- a/mrp_sale_info/i18n/de.po +++ b/mrp_sale_info/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mrp_sale_info -# +# # Translators: # Rudolf Schnapka , 2016 msgid "" @@ -11,50 +11,51 @@ msgstr "" "POT-Creation-Date: 2016-04-14 11:03+0000\n" "PO-Revision-Date: 2016-04-21 08:17+0000\n" "Last-Translator: Rudolf Schnapka \n" -"Language-Team: German (http://www.transifex.com/oca/OCA-manufacture-9-0/language/de/)\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" -"Language: de\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_production_workcenter_line_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_production_workcenter_line_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,help:mrp_sale_info.field_mrp_production_commitment_date -#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production_workcenter_line_commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder_commitment_date 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." +"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." #. module: mrp_sale_info #: model:ir.model,name:mrp_sale_info.model_mrp_production msgid "Manufacturing Order" msgstr "Fertigungsautrag" -#. module: mrp_sale_info -#: model:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workcenter_form_view_inherit -msgid "Sale Information" -msgstr "Verkaufsinformation" - #. 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_production_workcenter_line_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,name:mrp_sale_info.model_mrp_production_workcenter_line +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder msgid "Work Order" msgstr "Arbeitsauftrag" + +#~ msgid "Sale Information" +#~ msgstr "Verkaufsinformation" diff --git a/mrp_sale_info/i18n/es.po b/mrp_sale_info/i18n/es.po index 7f7fd7fba..a3b1039c7 100644 --- a/mrp_sale_info/i18n/es.po +++ b/mrp_sale_info/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mrp_sale_info -# +# # Translators: msgid "" msgstr "" @@ -10,50 +10,51 @@ msgstr "" "POT-Creation-Date: 2016-03-12 23:17+0000\n" "PO-Revision-Date: 2016-03-12 23:17+0000\n" "Last-Translator: OCA Transbot \n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-manufacture-9-0/language/es/)\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" -"Language: es\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_production_workcenter_line_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_production_workcenter_line_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,help:mrp_sale_info.field_mrp_production_commitment_date -#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production_workcenter_line_commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder_commitment_date 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." +"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." #. module: mrp_sale_info #: model:ir.model,name:mrp_sale_info.model_mrp_production msgid "Manufacturing Order" msgstr "Orden de producción" -#. module: mrp_sale_info -#: model:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workcenter_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_production_workcenter_line_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,name:mrp_sale_info.model_mrp_production_workcenter_line +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder msgid "Work Order" msgstr "Orden de trabajo" + +#~ msgid "Sale Information" +#~ msgstr "Información de venta" diff --git a/mrp_sale_info/i18n/fr.po b/mrp_sale_info/i18n/fr.po index e24470bda..8c148917d 100644 --- a/mrp_sale_info/i18n/fr.po +++ b/mrp_sale_info/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mrp_sale_info -# +# # Translators: msgid "" msgstr "" @@ -10,31 +10,32 @@ msgstr "" "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-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" -"Language: fr\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_production_workcenter_line_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_production_workcenter_line_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,help:mrp_sale_info.field_mrp_production_commitment_date -#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production_workcenter_line_commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder_commitment_date 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." +"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 "" #. module: mrp_sale_info @@ -42,18 +43,13 @@ msgstr "" msgid "Manufacturing Order" msgstr "" -#. module: mrp_sale_info -#: model:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workcenter_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_production_workcenter_line_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,name:mrp_sale_info.model_mrp_production_workcenter_line +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder msgid "Work Order" msgstr "" 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 000000000..ac62e70a5 --- /dev/null +++ b/mrp_sale_info/i18n/mrp_sale_info.pot @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +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_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,help:mrp_sale_info.field_mrp_production_commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder_commitment_date +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 "" + +#. module: mrp_sale_info +#: model:ir.model,name:mrp_sale_info.model_mrp_production +msgid "Manufacturing Order" +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,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 index d58a13cfd..eaea87fde 100644 --- a/mrp_sale_info/i18n/pt_BR.po +++ b/mrp_sale_info/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mrp_sale_info -# +# # Translators: # Claudio Araujo Santos , 2016 msgid "" @@ -11,50 +11,52 @@ msgstr "" "POT-Creation-Date: 2016-07-03 06:08+0000\n" "PO-Revision-Date: 2016-07-07 19:51+0000\n" "Last-Translator: Claudio Araujo Santos \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-manufacture-9-0/language/pt_BR/)\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" -"Language: pt_BR\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_production_workcenter_line_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_production_workcenter_line_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,help:mrp_sale_info.field_mrp_production_commitment_date -#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production_workcenter_line_commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder_commitment_date 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." +"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." #. module: mrp_sale_info #: model:ir.model,name:mrp_sale_info.model_mrp_production msgid "Manufacturing Order" msgstr "Ordem de fabricação" -#. module: mrp_sale_info -#: model:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workcenter_form_view_inherit -msgid "Sale Information" -msgstr "Informações venda" - #. 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_production_workcenter_line_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,name:mrp_sale_info.model_mrp_production_workcenter_line +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder msgid "Work Order" msgstr "Ordem de trabalho" + +#~ 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 index 9463cb5ac..edee1c558 100644 --- a/mrp_sale_info/i18n/zh_CN.po +++ b/mrp_sale_info/i18n/zh_CN.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mrp_sale_info -# +# # Translators: # Jeffery Chenn , 2016 msgid "" @@ -11,31 +11,32 @@ msgstr "" "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-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" -"Language: zh_CN\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_production_workcenter_line_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_production_workcenter_line_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,help:mrp_sale_info.field_mrp_production_commitment_date -#: model:ir.model.fields,help:mrp_sale_info.field_mrp_production_workcenter_line_commitment_date +#: model:ir.model.fields,help:mrp_sale_info.field_mrp_workorder_commitment_date 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." +"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 "" #. module: mrp_sale_info @@ -43,18 +44,16 @@ msgstr "" msgid "Manufacturing Order" msgstr "制造订单" -#. module: mrp_sale_info -#: model:ir.ui.view,arch_db:mrp_sale_info.mrp_production_workcenter_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_production_workcenter_line_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,name:mrp_sale_info.model_mrp_production_workcenter_line +#: model:ir.model,name:mrp_sale_info.model_mrp_workorder msgid "Work Order" msgstr "工单" + +#~ msgid "Sale Information" +#~ msgstr "销售信息" diff --git a/mrp_sale_info/models/__init__.py b/mrp_sale_info/models/__init__.py index cb18640f5..2618c7645 100644 --- a/mrp_sale_info/models/__init__.py +++ b/mrp_sale_info/models/__init__.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- -# © 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import mrp_production -from . import mrp_production_workcenter_line +from . import mrp_workorder diff --git a/mrp_sale_info/models/mrp_production.py b/mrp_sale_info/models/mrp_production.py index 24ddb0aa2..cfb01ee80 100644 --- a/mrp_sale_info/models/mrp_production.py +++ b/mrp_sale_info/models/mrp_production.py @@ -1,17 +1,18 @@ -# -*- coding: utf-8 -*- -# © 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields +from odoo import fields, models class MrpProduction(models.Model): _inherit = "mrp.production" sale_id = fields.Many2one( - 'sale.order', string='Sale order', readonly=True, store=True, - related='move_prod_id.procurement_id.sale_line_id.order_id') - partner_id = fields.Many2one(related='sale_id.partner_id', - string='Customer', store=True) - commitment_date = fields.Datetime(related='sale_id.commitment_date', - string='Commitment Date', store=True) + comodel_name='sale.order', string='Sale order', readonly=True, + store=True, related='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) diff --git a/mrp_sale_info/models/mrp_production_workcenter_line.py b/mrp_sale_info/models/mrp_workorder.py similarity index 73% rename from mrp_sale_info/models/mrp_production_workcenter_line.py rename to mrp_sale_info/models/mrp_workorder.py index 9991efe81..fa3a1490c 100644 --- a/mrp_sale_info/models/mrp_production_workcenter_line.py +++ b/mrp_sale_info/models/mrp_workorder.py @@ -1,12 +1,11 @@ -# -*- coding: utf-8 -*- -# © 2016 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields +from odoo import fields, models -class MrpProductionWorkcenterLine(models.Model): - _inherit = "mrp.production.workcenter.line" +class MrpWorkorder(models.Model): + _inherit = "mrp.workorder" sale_id = fields.Many2one(related='production_id.sale_id', string='Sale order', readonly=True, store=True) diff --git a/mrp_sale_info/views/mrp_production.xml b/mrp_sale_info/views/mrp_production.xml index 4fee03f44..93d4357f6 100644 --- a/mrp_sale_info/views/mrp_production.xml +++ b/mrp_sale_info/views/mrp_production.xml @@ -1,13 +1,11 @@ - - - + MRP Production Form with Sale Order mrp.production - + - + @@ -20,7 +18,7 @@ mrp.production - + @@ -28,5 +26,4 @@ - - + diff --git a/mrp_sale_info/views/mrp_production_workcenter_line.xml b/mrp_sale_info/views/mrp_production_workcenter_line.xml deleted file mode 100644 index 1af6ac649..000000000 --- a/mrp_sale_info/views/mrp_production_workcenter_line.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - MRP Production Work Order Tree with Sale Order - mrp.production.workcenter.line - - - - - - - - - - - - MRP Production Work Order Form with Sale Order - mrp.production.workcenter.line - - - - - - - - - - - - - - - - diff --git a/mrp_sale_info/views/mrp_workorder.xml b/mrp_sale_info/views/mrp_workorder.xml new file mode 100644 index 000000000..c1e16b47d --- /dev/null +++ b/mrp_sale_info/views/mrp_workorder.xml @@ -0,0 +1,29 @@ + + + + MRP Work Order Tree with Sale Order + mrp.workorder + + + + + + + + + + + + MRP Work Order Form with Sale Order + mrp.workorder + + + + + + + + + + +