[ADD] mrp_sale_info

This commit is contained in:
Javier Iniesta
2016-01-25 13:44:37 +01:00
committed by Kevin Khao
parent e6e7b9fc46
commit 448d6e353b
10 changed files with 267 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*.
* 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
<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
8.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 <ajuaristio@gmail.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,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

View File

@@ -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"
]
}

60
mrp_sale_info/i18n/es.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
#
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"

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<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="sale_mrp.view_mrp_production_form" />
<field name="arch" type="xml">
<field name="sale_name" 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" position="after">
<field name="sale_id"/>
<field name="partner_id"/>
<field name="commitment_date"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="mrp_production_workcenter_tree_view_inherit" model="ir.ui.view">
<field name="name">MRP Production Work Order Tree with Sale Order</field>
<field name="model">mrp.production.workcenter.line</field>
<field name="inherit_id" ref="mrp_operations.mrp_production_workcenter_tree_view_inherit"/>
<field name="arch" type="xml">
<field name="date_planned" 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 Production Work Order Form with Sale Order</field>
<field name="model">mrp.production.workcenter.line</field>
<field name="inherit_id" ref="mrp_operations.mrp_production_workcenter_form_view_inherit"/>
<field name="arch" type="xml">
<group string="Product to Produce" position="after">
<group string="Sale Information">
<field name="sale_id"/>
<field name="partner_id"/>
<field name="commitment_date"/>
</group>
</group>
</field>
</record>
</data>
</openerp>