diff --git a/mrp_sale_info/README.rst b/mrp_sale_info/README.rst new file mode 100644 index 000000000..fbe54e2ad --- /dev/null +++ b/mrp_sale_info/README.rst @@ -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*. + +* Add fields to Manufacturing Orders and Work Orders: + * Sale order + * Customer + * Commitment Date + +Usage +===== + +New fields are in Tree views and in Extra information tab at form views. + +.. 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/8.0 + +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 +`_. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Rafael Blasco +* Antonio Espinosa +* Javier Iniesta +* Oihane Crucelaegui ", +* Pedro M. Baeza ", +* Ana Juaristi " + +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. diff --git a/mrp_sale_info/__init__.py b/mrp_sale_info/__init__.py new file mode 100644 index 000000000..51736d4ae --- /dev/null +++ b/mrp_sale_info/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 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/__openerp__.py new file mode 100644 index 000000000..193ac2403 --- /dev/null +++ b/mrp_sale_info/__openerp__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# © 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": "8.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, " + "Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "mrp_operations", + "sale_mrp", + "sale_order_dates", + "stock" + ], + "data": [ + "views/mrp_production.xml", + "views/mrp_production_workcenter_line.xml" + ] +} diff --git a/mrp_sale_info/i18n/es.po b/mrp_sale_info/i18n/es.po new file mode 100644 index 000000000..1ef403d42 --- /dev/null +++ b/mrp_sale_info/i18n/es.po @@ -0,0 +1,60 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_sale_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-25 12:39+0000\n" +"PO-Revision-Date: 2016-01-25 12:39+0000\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 +#: field:mrp.production,commitment_date:0 +#: field:mrp.production.workcenter.line,commitment_date:0 +msgid "Commitment Date" +msgstr "Fecha compromiso" + +#. module: mrp_sale_info +#: field:mrp.production,partner_id:0 +#: field:mrp.production.workcenter.line,partner_id:0 +msgid "Customer" +msgstr "Cliente" + +#. module: mrp_sale_info +#: help:mrp.production,commitment_date:0 +#: help:mrp.production.workcenter.line,commitment_date:0 +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 +#: view:mrp.production.workcenter.line:mrp_sale_info.mrp_production_workcenter_form_view_inherit +msgid "Product to Produce" +msgstr "Producto a producir" + +#. module: mrp_sale_info +#: view:mrp.production.workcenter.line:mrp_sale_info.mrp_production_workcenter_form_view_inherit +msgid "Sale Information" +msgstr "Información de venta" + +#. module: mrp_sale_info +#: field:mrp.production,sale_id:0 +#: field:mrp.production.workcenter.line,sale_id:0 +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" diff --git a/mrp_sale_info/models/__init__.py b/mrp_sale_info/models/__init__.py new file mode 100644 index 000000000..cb18640f5 --- /dev/null +++ b/mrp_sale_info/models/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# © 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 diff --git a/mrp_sale_info/models/mrp_production.py b/mrp_sale_info/models/mrp_production.py new file mode 100644 index 000000000..24ddb0aa2 --- /dev/null +++ b/mrp_sale_info/models/mrp_production.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# © 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 + + +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) diff --git a/mrp_sale_info/models/mrp_production_workcenter_line.py b/mrp_sale_info/models/mrp_production_workcenter_line.py new file mode 100644 index 000000000..9991efe81 --- /dev/null +++ b/mrp_sale_info/models/mrp_production_workcenter_line.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# © 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 + + +class MrpProductionWorkcenterLine(models.Model): + _inherit = "mrp.production.workcenter.line" + + 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) diff --git a/mrp_sale_info/static/description/icon.png b/mrp_sale_info/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/mrp_sale_info/static/description/icon.png differ diff --git a/mrp_sale_info/views/mrp_production.xml b/mrp_sale_info/views/mrp_production.xml new file mode 100644 index 000000000..ea9ace7d4 --- /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_production_workcenter_line.xml b/mrp_sale_info/views/mrp_production_workcenter_line.xml new file mode 100644 index 000000000..df4824f71 --- /dev/null +++ b/mrp_sale_info/views/mrp_production_workcenter_line.xml @@ -0,0 +1,34 @@ + + + + + + MRP Production Work Order Tree with Sale Order + mrp.production.workcenter.line + + + + + + + + + + + + MRP Production Work Order Form with Sale Order + mrp.production.workcenter.line + + + + + + + + + + + + + +