Skip to Content
Menu
This question has been flagged
2177 Views

How do I drag mrp.workorder ('date_start', 'date_finished', 'workcenter_id') fields to my custom module and show them in a One2many field? Also I have two date fields that I want to compare with mrp.workorder's "date_start","date_finished" fields.

My code so far in odoo v10 enterprise

oee_reports.py

# -*- coding: utf-8 -*-from odoo import api, fields,models

class OeeReports(models.Model):
    _name = 'oee.reports'
    _inherit = 'mrp.workorder'
 
    date_from = fields.Datetime(string='Fecha inicial', required=True)
    date_to = fields.Datetime(string='Fecha final', required=True)

 thanks

Avatar
Discard