Merge pull request #294 from avanzosc/11.0-mig-mrp_sale_info

[11.0][MIG] mrp_sale_info: Migration to 11.0
This commit is contained in:
Pedro M. Baeza
2018-08-20 17:34:45 +02:00
committed by GitHub
14 changed files with 493 additions and 0 deletions

68
mrp_sale_info/README.rst Normal file
View File

@@ -0,0 +1,68 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
=============
MRP Sale Info
=============
This module extends the functionality of sale_mrp and adds related fields to Manufacturing Orders and Work Orders:
* Sale order
* Customer
* Commitment Date
Usage
=====
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/11.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/manufacture/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/
manufacture/issues/new?body=module:%20
mrp_sale_info%0Aversion:%20
11.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Rafael Blasco <rafabn@antiun.com>
* Antonio Espinosa <antonioea@antiun.com>
* Javier Iniesta <javieria@antiun.com>
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* Ana Juaristi <anajuaristi@avanzosc.es>
* Victor M. Martin <victor.martin@elico-corp.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
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.
To contribute to this module, please visit https://odoo-community.org.

View File

@@ -0,0 +1,4 @@
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

View File

@@ -0,0 +1,26 @@
# 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": "11.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_mrp",
"sale_order_dates",
"stock",
"sale_stock",
],
"data": [
"views/mrp_production.xml",
"views/mrp_workorder.xml",
]
}

60
mrp_sale_info/i18n/de.po Normal file
View File

@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_sale_info
#
# Translators:
# Rudolf Schnapka <rs@techno-flex.de>, 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: 2016-04-21 08:17+0000\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
"Language-Team: German (http://www.transifex.com/oca/OCA-manufacture-9-0/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
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
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
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."
#. 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
msgid "Sale order"
msgstr "Verkaufsauftrag"
#. module: mrp_sale_info
#: model:ir.model,name:mrp_sale_info.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Arbeitsauftrag"

59
mrp_sale_info/i18n/es.po Normal file
View File

@@ -0,0 +1,59 @@
# 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: 2016-03-12 23:17+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-manufacture-9-0/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
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
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
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."
#. 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
msgid "Sale order"
msgstr "Pedido de venta"
#. module: mrp_sale_info
#: model:ir.model,name:mrp_sale_info.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Orden de trabajo"

59
mrp_sale_info/i18n/fr.po Normal file
View File

@@ -0,0 +1,59 @@
# 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"
"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
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
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
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.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
msgid "Sale order"
msgstr ""
#. module: mrp_sale_info
#: model:ir.model,name:mrp_sale_info.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr ""

View File

@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_sale_info
#
# Translators:
# Claudio Araujo Santos <claudioaraujosantos@gmail.com>, 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: 2016-07-07 19:51+0000\n"
"Last-Translator: Claudio Araujo Santos <claudioaraujosantos@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-manufacture-9-0/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
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
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
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."
#. 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
msgid "Sale order"
msgstr "Ordem de venda"
#. module: mrp_sale_info
#: model:ir.model,name:mrp_sale_info.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Ordem de trabalho"

View File

@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_sale_info
#
# Translators:
# Jeffery Chenn <jeffery9@gmail.com>, 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 <jeffery9@gmail.com>\n"
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-manufacture-9-0/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
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
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
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.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
msgid "Sale order"
msgstr "销售订单"
#. module: mrp_sale_info
#: model:ir.model,name:mrp_sale_info.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "工单"

View File

@@ -0,0 +1,5 @@
# 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_workorder

View File

@@ -0,0 +1,18 @@
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
# 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"
sale_id = fields.Many2one(
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)

View File

@@ -0,0 +1,16 @@
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
# 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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="name">MRP Production Form with Sale Order</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<field name="availability" position="after">
<field name="sale_id"/>
<field name="partner_id"/>
<field name="commitment_date"/>
</field>
</field>
</record>
<record id="mrp_production_tree_view" model="ir.ui.view">
<field name="name">MRP Production Tree with Sale Order</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_tree_view"/>
<field name="arch" type="xml">
<field name="date_planned_start" position="after">
<field name="sale_id"/>
<field name="partner_id"/>
<field name="commitment_date"/>
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mrp_production_workcenter_tree_view_inherit" model="ir.ui.view">
<field name="name">MRP Work Order Tree with Sale Order</field>
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.mrp_production_workcenter_tree_view_inherit"/>
<field name="arch" type="xml">
<field name="date_planned_start" position="after">
<field name="sale_id"/>
<field name="partner_id"/>
<field name="commitment_date"/>
</field>
</field>
</record>
<record id="mrp_production_workcenter_form_view_inherit" model="ir.ui.view">
<field name="name">MRP Work Order Form with Sale Order</field>
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.mrp_production_workcenter_form_view_inherit"/>
<field name="arch" type="xml">
<field name="production_id" position="after">
<field name="sale_id"/>
<field name="partner_id"/>
<field name="commitment_date"/>
</field>
</field>
</record>
</odoo>