[ADD] mrp_project

================
MRP Project Link
================

This module links projects and tasks to *manufacturing orders* (MO) and
*work orders* (WO).

Usage
=====

In a manufacturing order (MO), you can select a project to be attached to it.
If none is selected, a project is automatically created when the MO is
confirmed.

When the MO starts, a task is created and assigned to the order.
This commit is contained in:
Pedro M. Baeza
2015-11-26 16:57:39 +01:00
parent b9229a10c5
commit 85b3ed0962
23 changed files with 1648 additions and 1 deletions

71
mrp_project/README.rst Normal file
View File

@@ -0,0 +1,71 @@
.. 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 Project Link
================
This module links projects and tasks to *manufacturing orders* (MO) and
*work orders* (WO).
Installation
============
It depends on the module *mrp_analytic*, that is hosted on
OCA/account-analytic: https://github.com/OCA/account-analytic
Usage
=====
In a manufacturing order (MO), you can select a project to be attached to it.
If none is selected, a project is automatically created when the MO is
confirmed.
When the MO starts, a task is created and assigned to the order.
.. 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_project%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Images
------
* Original Odoo icons.
* Thanks to https://openclipart.org/detail/15193/Arrow%20set%20%28Comic%29
Contributors
------------
* Daniel Campos <danielcampos@avanzosc.es>
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.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.

5
mrp_project/__init__.py Normal file
View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# (c) 2015 Pedro M. Baeza - Serv. Tecnol. Avanzados
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# (c) 2014 Daniel Campos <danielcampos@avanzosc.es>
# (c) 2015 Pedro M. Baeza - Serv. Tecnol. Avanzados
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "MRP Project Link",
"summary": "Link production with projects",
"version": "8.0.1.1.0",
"depends": [
"mrp_analytic",
"project",
],
'license': 'AGPL-3',
"author": "OdooMRP team,"
"AvanzOSC,"
"Serv. Tecnol. Avanzados - Pedro M. Baeza,"
"Antiun Ingeniería,"
"Odoo Community Association (OCA)",
"category": "Manufacturing",
'data': [
"views/mrp_production_view.xml",
"views/project_project_view.xml",
"views/account_analytic_line_view.xml",
"views/project_task_view.xml"
],
'installable': True,
'auto_install': False,
}

168
mrp_project/i18n/es.po Normal file
View File

@@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_project
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
"PO-Revision-Date: 2015-10-09 10:50+0000\n"
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/odoomrp-wip-8-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_project
#: code:addons/mrp_project/models/mrp_production.py:51
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Product to Produce: [%s]%s\n"
" Quantity to Produce: %s\n"
" Bill of Material: %s\n"
" Planned Date: %s\n"
" "
msgstr "\n Orden de fabricación: %s\n Producto a producir: [%s]%s\n Cantidad a producir: %s\n Lista de materiales: %s\n Fecha planificada: %s\n "
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:103
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Work Order: %s\n"
" Workcenter: %s\n"
" Cycle: %s\n"
" Hour: %s\n"
" "
msgstr "\n Orden de fabricación: %s\n Orden de trabajo: %s\n Centro de producción: %s\n Ciclo: %s\n Hora: %s\n "
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:129
#, python-format
msgid "%s:: WO%s-%s:: %s"
msgstr "%s:: OT%s-%s:: %s"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: field:mrp.production,analytic_account_id:0
msgid "Analytic Account"
msgstr "Cuenta analítica"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_account_analytic_line
msgid "Analytic Line"
msgstr "Línea analítica"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
msgid "General Accounting"
msgstr "Contabilidad general"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "MRP Data"
msgstr "Información de fabricación"
#. module: mrp_project
#: field:procurement.order,main_project_id:0
#: field:stock.move,main_project_id:0
msgid "Main Project"
msgstr "Proyecto principal"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Manufacturing"
msgstr "Fabricación"
#. module: mrp_project
#: field:account.analytic.line,mrp_production_id:0
#: model:ir.model,name:mrp_project.model_mrp_production
#: field:project.task,mrp_production_id:0
msgid "Manufacturing Order"
msgstr "Orden de fabricación"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_production_all
msgid "Manufacturing Orders"
msgstr "Órdenes de fabricación"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_procurement_order
msgid "Procurement"
msgstr "Abastecimiento"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_procurement_all
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
msgid "Procurements"
msgstr "Abastecimientos"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_tree_view
msgid "Product to Produce"
msgstr "Producto a producir"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_mrp_production_product_line
msgid "Production Scheduled Product"
msgstr "Producto planificado de la fabricación"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_project
#: field:mrp.production,project_id:0
msgid "Project"
msgstr "Proyecto"
#. module: mrp_project
#: field:account.analytic.line,task_id:0
msgid "Project Task"
msgstr "Tarea de proyecto"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "Scheduled Products"
msgstr "Productos planificados"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Stage"
msgstr "Etapa"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de stock"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_task
#: field:mrp.production.product.line,task_id:0
msgid "Task"
msgstr "Tarea"
#. module: mrp_project
#: field:account.analytic.line,workorder:0
#: model:ir.model,name:mrp_project.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Orden de trabajo"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Workorder"
msgstr "Orden de trabajo"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
msgid "group_analytic_account"
msgstr ""

168
mrp_project/i18n/it.po Normal file
View File

@@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_project
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-20 18:10+0000\n"
"PO-Revision-Date: 2015-09-10 16:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: Italian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:51
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Product to Produce: [%s]%s\n"
" Quantity to Produce: %s\n"
" Bill of Material: %s\n"
" Planned Date: %s\n"
" "
msgstr ""
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:103
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Work Order: %s\n"
" Workcenter: %s\n"
" Cycle: %s\n"
" Hour: %s\n"
" "
msgstr ""
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:129
#, python-format
msgid "%s:: WO%s-%s:: %s"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: field:mrp.production,analytic_account_id:0
msgid "Analytic Account"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
msgid "General Accounting"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "MRP Data"
msgstr ""
#. module: mrp_project
#: field:procurement.order,main_project_id:0
#: field:stock.move,main_project_id:0
msgid "Main Project"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Manufacturing"
msgstr ""
#. module: mrp_project
#: field:account.analytic.line,mrp_production_id:0
#: model:ir.model,name:mrp_project.model_mrp_production
#: field:project.task,mrp_production_id:0
msgid "Manufacturing Order"
msgstr "Ordine di produzione"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_production_all
msgid "Manufacturing Orders"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_procurement_order
msgid "Procurement"
msgstr ""
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_procurement_all
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
msgid "Procurements"
msgstr ""
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_tree_view
msgid "Product to Produce"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_mrp_production_product_line
msgid "Production Scheduled Product"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_project
#: field:mrp.production,project_id:0
msgid "Project"
msgstr ""
#. module: mrp_project
#: field:account.analytic.line,task_id:0
msgid "Project Task"
msgstr ""
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "Scheduled Products"
msgstr ""
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Stage"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_stock_move
msgid "Stock Move"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_task
#: field:mrp.production.product.line,task_id:0
msgid "Task"
msgstr ""
#. module: mrp_project
#: field:account.analytic.line,workorder:0
#: model:ir.model,name:mrp_project.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Ordine di lavorazione"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Workorder"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
msgid "group_analytic_account"
msgstr ""

168
mrp_project/i18n/pt_BR.po Normal file
View File

@@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_project
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
"PO-Revision-Date: 2015-10-09 03:38+0000\n"
"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-wip-8-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_project
#: code:addons/mrp_project/models/mrp_production.py:51
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Product to Produce: [%s]%s\n"
" Quantity to Produce: %s\n"
" Bill of Material: %s\n"
" Planned Date: %s\n"
" "
msgstr ""
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:103
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Work Order: %s\n"
" Workcenter: %s\n"
" Cycle: %s\n"
" Hour: %s\n"
" "
msgstr ""
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:129
#, python-format
msgid "%s:: WO%s-%s:: %s"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: field:mrp.production,analytic_account_id:0
msgid "Analytic Account"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
msgid "General Accounting"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "MRP Data"
msgstr ""
#. module: mrp_project
#: field:procurement.order,main_project_id:0
#: field:stock.move,main_project_id:0
msgid "Main Project"
msgstr "Projeto principal"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Manufacturing"
msgstr ""
#. module: mrp_project
#: field:account.analytic.line,mrp_production_id:0
#: model:ir.model,name:mrp_project.model_mrp_production
#: field:project.task,mrp_production_id:0
msgid "Manufacturing Order"
msgstr "Ordem de Produção"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_production_all
msgid "Manufacturing Orders"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_procurement_order
msgid "Procurement"
msgstr "Aprovisionamento"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_procurement_all
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
msgid "Procurements"
msgstr ""
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_tree_view
msgid "Product to Produce"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_mrp_production_product_line
msgid "Production Scheduled Product"
msgstr "Produção de produto agendada"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_project
#: field:mrp.production,project_id:0
msgid "Project"
msgstr "Projeto"
#. module: mrp_project
#: field:account.analytic.line,task_id:0
msgid "Project Task"
msgstr ""
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "Scheduled Products"
msgstr ""
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Stage"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_stock_move
msgid "Stock Move"
msgstr "Movimentação de estoque"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_task
#: field:mrp.production.product.line,task_id:0
msgid "Task"
msgstr ""
#. module: mrp_project
#: field:account.analytic.line,workorder:0
#: model:ir.model,name:mrp_project.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Ordem de serviço"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Workorder"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
msgid "group_analytic_account"
msgstr ""

169
mrp_project/i18n/ro.po Normal file
View File

@@ -0,0 +1,169 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_project
#
# Translators:
# Dorin Hongu <dhongu@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-20 18:10+0000\n"
"PO-Revision-Date: 2015-11-18 00:34+0000\n"
"Last-Translator: Dorin Hongu <dhongu@gmail.com>\n"
"Language-Team: Romanian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ro\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:51
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Product to Produce: [%s]%s\n"
" Quantity to Produce: %s\n"
" Bill of Material: %s\n"
" Planned Date: %s\n"
" "
msgstr ""
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:103
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Work Order: %s\n"
" Workcenter: %s\n"
" Cycle: %s\n"
" Hour: %s\n"
" "
msgstr ""
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:129
#, python-format
msgid "%s:: WO%s-%s:: %s"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: field:mrp.production,analytic_account_id:0
msgid "Analytic Account"
msgstr "Cont analitic"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
msgid "General Accounting"
msgstr "Contabilitate generală"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "MRP Data"
msgstr ""
#. module: mrp_project
#: field:procurement.order,main_project_id:0
#: field:stock.move,main_project_id:0
msgid "Main Project"
msgstr "Proiect principal"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Manufacturing"
msgstr "Fabricație"
#. module: mrp_project
#: field:account.analytic.line,mrp_production_id:0
#: model:ir.model,name:mrp_project.model_mrp_production
#: field:project.task,mrp_production_id:0
msgid "Manufacturing Order"
msgstr "Comandă fabricație"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_production_all
msgid "Manufacturing Orders"
msgstr "Comenzi fabricație"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_procurement_order
msgid "Procurement"
msgstr "Aprovizionare"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_procurement_all
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
msgid "Procurements"
msgstr "Aprovizionări"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_tree_view
msgid "Product to Produce"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_mrp_production_product_line
msgid "Production Scheduled Product"
msgstr ""
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_project
#: field:mrp.production,project_id:0
msgid "Project"
msgstr "Proiect"
#. module: mrp_project
#: field:account.analytic.line,task_id:0
msgid "Project Task"
msgstr "Sarcină proiect"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "Scheduled Products"
msgstr ""
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Stage"
msgstr "Stadiu"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_stock_move
msgid "Stock Move"
msgstr "Mișcare stoc"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_task
#: field:mrp.production.product.line,task_id:0
msgid "Task"
msgstr "Sarcină"
#. module: mrp_project
#: field:account.analytic.line,workorder:0
#: model:ir.model,name:mrp_project.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Comandă de lucru"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Workorder"
msgstr "Comandă de lucru"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
msgid "group_analytic_account"
msgstr "group_analytic_account"

169
mrp_project/i18n/sl.po Normal file
View File

@@ -0,0 +1,169 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_project
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
"PO-Revision-Date: 2015-09-20 19:00+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:51
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Product to Produce: [%s]%s\n"
" Quantity to Produce: %s\n"
" Bill of Material: %s\n"
" Planned Date: %s\n"
" "
msgstr "\n Proizvodni nalog: %s\n Proizvodi za proizvodnjo: [%s]%s\n Količina za proizvodnjo: %s\n Kosovnica: %s\n Načrtovani datum: %s\n "
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:103
#, python-format
msgid ""
"\n"
" Manufacturing Order: %s\n"
" Work Order: %s\n"
" Workcenter: %s\n"
" Cycle: %s\n"
" Hour: %s\n"
" "
msgstr "\n Proizvodni nalog: %s\n Delovni nalog: %s\n Delovni center: %s\n Cikel: %s\n Ur: %s\n "
#. module: mrp_project
#: code:addons/mrp_project/models/mrp_production.py:129
#, python-format
msgid "%s:: WO%s-%s:: %s"
msgstr "%s:: WO%s-%s:: %s"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: field:mrp.production,analytic_account_id:0
msgid "Analytic Account"
msgstr "Analitični konto"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_account_analytic_line
msgid "Analytic Line"
msgstr "Analitična postavka"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
msgid "General Accounting"
msgstr "Glavna knjiga"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "MRP Data"
msgstr "Podatki upravljanja proizvodnje"
#. module: mrp_project
#: field:procurement.order,main_project_id:0
#: field:stock.move,main_project_id:0
msgid "Main Project"
msgstr "Glavni projekt"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Manufacturing"
msgstr "Proizvodnja"
#. module: mrp_project
#: field:account.analytic.line,mrp_production_id:0
#: model:ir.model,name:mrp_project.model_mrp_production
#: field:project.task,mrp_production_id:0
msgid "Manufacturing Order"
msgstr "Proizvodni nalog"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_production_all
msgid "Manufacturing Orders"
msgstr "Proizvodni nalogi"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_procurement_order
msgid "Procurement"
msgstr "Oskrba"
#. module: mrp_project
#: model:ir.actions.act_window,name:mrp_project.act_project_2_procurement_all
#: view:project.project:mrp_project.project_mrp_procurement_shortcut_form_view
msgid "Procurements"
msgstr "Oskrbe"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
#: view:project.task:mrp_project.project_task_mrp_inh_tree_view
msgid "Product to Produce"
msgstr "Proiz. za proizvodnjo"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_mrp_production_product_line
msgid "Production Scheduled Product"
msgstr "Proizvod načrtovan za proizvodnjo"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_project
#: field:mrp.production,project_id:0
msgid "Project"
msgstr "Projekt"
#. module: mrp_project
#: field:account.analytic.line,task_id:0
msgid "Project Task"
msgstr "Projektno opravilo"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_form_view
msgid "Scheduled Products"
msgstr "Načrtovani proizvodi"
#. module: mrp_project
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Stage"
msgstr "Stopnja"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_stock_move
msgid "Stock Move"
msgstr "Premik zaloge"
#. module: mrp_project
#: model:ir.model,name:mrp_project.model_project_task
#: field:mrp.production.product.line,task_id:0
msgid "Task"
msgstr "Opravilo"
#. module: mrp_project
#: field:account.analytic.line,workorder:0
#: model:ir.model,name:mrp_project.model_mrp_production_workcenter_line
msgid "Work Order"
msgstr "Delovni nalog"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
#: view:project.task:mrp_project.project_task_mrp_inh_search_view
msgid "Workorder"
msgstr "Delovni nalog"
#. module: mrp_project
#: view:account.analytic.line:mrp_project.account_analytic_line_mrp_search_view
msgid "group_analytic_account"
msgstr "group_analytic_account"

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# (c) 2014 Daniel Campos <danielcampos@avanzosc.es>
# (c) 2015 Pedro M. Baeza - Serv. Tecnol. Avanzados
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import mrp_production
from . import account_analytic_line
from . import project_project
from . import project_task
from . import project_task_work

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# (c) 2014 Daniel Campos <danielcampos@avanzosc.es>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields
class AccountAnalyticLine(models.Model):
_inherit = 'account.analytic.line'
mrp_production_id = fields.Many2one(
comodel_name='mrp.production', string='Manufacturing Order',
related="task_id.mrp_production_id", store=True)
workorder = fields.Many2one(
comodel_name='mrp.production.workcenter.line', string='Work Order',
related="task_id.workorder", store=True)
task_id = fields.Many2one('project.task', 'Project Task')

View File

@@ -0,0 +1,93 @@
# -*- coding: utf-8 -*-
# (c) 2014 Daniel Campos <danielcampos@avanzosc.es>
# (c) 2015 Pedro M. Baeza - Serv. Tecnol. Avanzados
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api, _
class MrpProduction(models.Model):
_inherit = 'mrp.production'
project_id = fields.Many2one(
comodel_name="project.project", string="Project", copy=False,
readonly=True, states={'draft': [('readonly', False)]})
analytic_account_id = fields.Many2one(
related="project_id.analytic_account_id", store=True)
@api.model
def _prepare_project_vals(self, production):
return {
'name': production.name,
'use_tasks': True,
'automatic_creation': True,
}
@api.model
def _prepare_production_task(self, production):
product = production.product_id
task_name = "%s::%s%s" % (
production.name,
"[%s] " % product.default_code if product.default_code else "",
product.name)
task_descr = _("""
Manufacturing Order: %s
Product to Produce: [%s]%s
Quantity to Produce: %s
Bill of Material: %s
Planned Date: %s
""") % (production.name, production.product_id.default_code,
production.product_id.name, production.product_qty,
production.bom_id.name, production.date_planned)
return {
'mrp_production_id': production.id,
'user_id': production.user_id.id,
'reviewer_id': production.user_id.id,
'name': task_name,
'project_id': production.project_id.id,
'description': task_descr
}
@api.multi
def action_in_production(self):
task_obj = self.env['project.task']
for record in self:
task_domain = [('mrp_production_id', '=', record.id),
('workorder', '=', False)]
tasks = task_obj.search(task_domain)
if not tasks:
task_obj.create(self._prepare_production_task(record))
return super(MrpProduction, self).action_in_production()
@api.multi
def action_confirm(self):
project_obj = self.env['project.project']
result = super(MrpProduction, self).action_confirm()
for production in self:
if not production.project_id:
project_vals = self._prepare_project_vals(production)
project = project_obj.create(project_vals)
production.project_id = project.id
return result
@api.multi
def unlink(self):
projects = self.mapped('project_id').filtered('automatic_creation')
tasks = self.env['project.task'].search(
[('project_id', 'in', projects.ids)])
if not tasks.mapped('work_ids'):
child_tasks = tasks.filtered(lambda x: x.parent_ids)
child_tasks.unlink()
(tasks - child_tasks).unlink()
projects.unlink()
return super(MrpProduction, self).unlink()
class MrpProductionWorkcenterLine(models.Model):
_inherit = 'mrp.production.workcenter.line'
task_ids = fields.One2many(
comodel_name="project.task", inverse_name="workorder", string="Tasks")
work_ids = fields.One2many(
comodel_name="project.task.work", inverse_name="workorder",
string="Task works")

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# (c) 2014 Daniel Campos <danielcampos@avanzosc.es>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
class ProjectProject(models.Model):
_inherit = 'project.project'
@api.one
def _project_shortcut_count(self):
self.production_count = len(
self.env['mrp.production'].search([('project_id', '=', self.id)]))
production_count = fields.Integer(
string='Manufacturing Count', compute=_project_shortcut_count)
automatic_creation = fields.Boolean('Automatic Creation')

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# (c) 2014 Daniel Campos <danielcampos@avanzosc.es>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
class ProjectTask(models.Model):
_inherit = 'project.task'
workorder = fields.Many2one(
comodel_name='mrp.production.workcenter.line', string='Work Order',
oldname='wk_order')
mrp_production_id = fields.Many2one(
'mrp.production', string='Manufacturing Order')
production_scheduled_products = fields.One2many(
comodel_name="mrp.production.product.line", inverse_name='task_id',
related='mrp_production_id.product_lines', string='Scheduled Products')
final_product = fields.Many2one(
comodel_name='product.product', string='Product to Produce',
store=False, related='mrp_production_id.product_id')
@api.multi
def name_get(self):
if self.env.context.get('name_show_user'):
res = []
for task in self:
res.append(
(task.id, "[%s] %s" % (task.user_id.name, task.name)))
return res
return super(ProjectTask, self).name_get()

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# (c) 2015 Pedro M. Baeza - Serv. Tecnol. Avanzados
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
from datetime import datetime
class ProjectTaskWork(models.Model):
_inherit = 'project.task.work'
workorder = fields.Many2one(
comodel_name="mrp.production.workcenter.line",
related="task_id.workorder", store=True, string="Work order")
@api.multi
def button_end_work(self):
end_date = datetime.now()
for work in self:
date = fields.Datetime.from_string(work.date)
work.hours = (end_date - date).total_seconds() / 3600
return True
@api.multi
def onchange_task_id(self, task_id):
res = {}
if task_id:
task = self.env['project.task'].browse(task_id)
res['value'] = {'user_id': task.user_id.id}
return res

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# (c) 2015 Pedro M. Baeza - Serv. Tecnol. Avanzados
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import test_mrp_project

View File

@@ -0,0 +1,77 @@
# -*- coding: utf-8 -*-
# (c) 2015 Pedro M. Baeza - Serv. Tecnol. Avanzados
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
import time
import openerp.tests.common as common
from openerp import fields
class TestMrpProject(common.TransactionCase):
def setUp(self):
super(TestMrpProject, self).setUp()
self.product = self.env['product.product'].create({'name': 'Test'})
self.bom = self.env['mrp.bom'].create(
{
'product_id': self.product.id,
'product_tmpl_id': self.product.product_tmpl_id.id,
})
self.production = self.env['mrp.production'].create(
{
'product_id': self.product.id,
'product_uom': self.env.ref('product.product_uom_unit').id,
'bom_id': self.bom.id,
})
self.task = self.env['project.task'].create({
'name': "Test",
'user_id': self.env.uid,
})
def test_project_full(self):
self.assertFalse(self.production.project_id)
self.production.signal_workflow('button_confirm')
self.assertTrue(self.production.project_id)
self.assertEqual(self.production.project_id.production_count, 1)
self.production.force_production()
# start the MO (and this starts the first WO)
self.assertFalse(self.production.project_id.task_ids)
self.production.signal_workflow('button_produce')
self.assertEqual(len(self.production.project_id.task_ids), 1)
# Remove production to see if the project is removed
project = self.production.project_id
self.production.signal_workflow('button_cancel')
self.production.unlink()
self.assertFalse(project.exists())
def test_preservation_project_with_works(self):
self.production.signal_workflow('button_confirm')
self.production.force_production()
self.production.signal_workflow('button_produce')
work = self.env['project.task.work'].create(
{'task_id': self.production.project_id.task_ids[0].id,
'name': 'Test work',
'user_id': self.env.user.id,
'hours': 1.0})
# Remove production to see if the project is removed
project = self.production.project_id
self.production.signal_workflow('button_cancel')
self.production.unlink()
self.assertTrue(project.exists())
self.assertTrue(work.exists())
def test_task_name(self):
self.assertEqual(
self.task.with_context(name_show_user=True).name_get()[0][1],
"[%s] Test" % self.env.user.name)
def test_onchange_task(self):
res = self.env['project.task.work'].onchange_task_id(self.task.id)
self.assertEqual(res['value']['user_id'], self.task.user_id.id)
def test_button_end_work(self):
work = self.env['project.task.work'].create(
{'task_id': self.task.id,
'date': fields.Datetime.now()})
time.sleep(1)
work.button_end_work()
self.assertNotEqual(work.hours, 0.0)

View File

@@ -0,0 +1,46 @@
<openerp>
<data>
<record model="ir.ui.view" id="account_analytic_line_mrp_search_view">
<field name="name">account.analytic.line.mrp.inh.search</field>
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="account.view_account_analytic_line_filter"/>
<field name="arch" type="xml">
<field name="date" position="after">
<field name="mrp_production_id"/>
<field name="workorder"/>
</field>
<filter string="Analytic Account" position="before">
<filter string="Manufacturing" name="group_production" context="{'group_by':'mrp_production_id'}"/>
<filter string="Workorder" name="group_workorder" context="{'group_by':'workorder'}"/>
</filter>
<filter string="Analytic Account" position="attributes">
<attribute name="name">group_analytic_account</attribute>
</filter>
</field>
</record>
<record model="ir.ui.view" id="account_analytic_line_mrp_tree_view">
<field name="name">account.analytic.line.mrp.inh.tree</field>
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="account.view_account_analytic_line_tree"/>
<field name="arch" type="xml">
<field name="company_id" position="before">
<field name="mrp_production_id"/>
<field name="workorder"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="account_analytic_line_mrp_form_view">
<field name="name">account.analytic.line.mrp.inh.form</field>
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="account.view_account_analytic_line_form"/>
<field name="arch" type="xml">
<group string="General Accounting" position="after">
<group string="MRP Data">
<field name="mrp_production_id" colspan="2"/>
<field name="workorder" colspan="2"/>
</group>
</group>
</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,32 @@
<openerp>
<data>
<record model="ir.ui.view" id="mrp_production_project_form_view">
<field name="name">mrp.production.project.inh.form</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<field name="analytic_account_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="analytic_account_id" position="after">
<field name="project_id"/>
</field>
</field>
</record>
<record id="act_project_2_production_all" model="ir.actions.act_window">
<field name="name">Manufacturing Orders</field>
<field name="res_model">mrp.production</field>
<field name="view_mode">tree,form</field>
<field name="context">{
'search_default_project_id': [active_id],
'default_project_id': active_id,
'active_test': False,
}
</field>
<field name="domain">[('project_id', '=', active_id)]</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,23 @@
<openerp>
<data>
<record model="ir.ui.view" id="project_mrp_procurement_shortcut_form_view">
<field name="name">project.shortcuts.mrp.procurement.form</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project" />
<field name="arch" type="xml">
<div name="buttons" position="inside">
<button class="oe_inline oe_stat_button"
type="action"
name="%(mrp_project.act_project_2_production_all)d"
icon="fa-list">
<field string="Manufacturing" name="production_count"
widget="statinfo"
/>
</button>
</div>
</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,62 @@
<openerp>
<data>
<record model="ir.ui.view" id="project_task_mrp_inh_search_view">
<field name="name">project.task.mrp.inh.search</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_search_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="mrp_production_id"/>
<field name="workorder"/>
</field>
<filter string="Stage" position="after">
<filter string="Manufacturing" name="Manufacturing" context="{'group_by':'mrp_production_id'}"/>
<filter string="Workorder" name="Workorder" context="{'group_by': 'workorder'}"/>
</filter>
</field>
</record>
<record model="ir.ui.view" id="project_task_mrp_inh_tree_view">
<field name="name">project.task.mrp.inh.tree</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_tree2"/>
<field name="arch" type="xml">
<field name="project_id" position="after">
<field name="mrp_production_id"/>
<field name="workorder"/>
<field name="final_product" string="Product to Produce"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="project_task_mrp_form_view">
<field name="name">project.task.mrp.inh.form</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="MRP Data">
<group name="group_mrp_data">
<field name="mrp_production_id"/>
<field name="workorder"/>
<field name="final_product" string="Product to Produce"/>
<separator colspan="4" string="Scheduled Products"/>
<field name="production_scheduled_products"
colspan="4"
nolabel="1"
attrs="{'invisible':['|', ('workorder', '!=', False), ('mrp_production_id', '=', False)]}"
/>
<label string="Please go to the manufacturing order to see the products to consume."
colspan="4"
for="production_scheduled_products"
attrs="{'invisible': [('workorder', '=', False)]}"
/>
</group>
</page>
</notebook>
</field>
</record>
</data>
</openerp>

View File

@@ -1,3 +1,4 @@
# List the OCA project dependencies, one per line
# Add a repository url and branch if you need a forked version
product-attribute
product-attribute
account-analytic