123456789101112131415161718192021 |
- # -*- encoding: utf-8 -*-
- from openerp import models, api, fields
- class MrpProduction(models.Model):
- _inherit = 'mrp.production'
- sale_id = fields.Many2one(
- comodel_name='sale.order', string='Sale order',
- readonly=True, store=True,
- related='move_prod_id.procurement_id.sale_line_id.order_id')
- sale_line_id = fields.Many2one(
- comodel_name='sale.order.line', string='Sale Line',
- related='move_prod_id.procurement_id.sale_line_id')
- mrp_machine_id = fields.Many2one(related='sale_line_id.mrp_machine_id',
- string='Maquina', store=True)
- partner_id = fields.Many2one(related='sale_id.partner_id',
- string='Customer', store=True)
- date_order = fields.Datetime(related='sale_id.date_order',
- string='Fecha del Pedido', store=True)
- product_name=fields.Text(String='Descripción', related='sale_line_id.name', store=True)
|