mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
- Change workcenter.line to mrp.workorder - move_prod_id not exist. search sale information from move_finished_ids and changed related field to compute field - add unit test
18 lines
729 B
Python
18 lines
729 B
Python
# -*- coding: utf-8 -*-
|
|
# © 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
from odoo import models, fields
|
|
|
|
|
|
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)
|