Files
manufacture/mrp_project/models/account_analytic_line.py
Pedro M. Baeza 85b3ed0962 [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.
2015-12-04 15:12:29 +01:00

19 lines
648 B
Python

# -*- 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')