Maybe I haven't understood something fundamental about how odoo works. I have made a module that inherits mrp.production and adds 2 fields in manufacturing order(a checkbox and a text box) with the appropriate changes in the xml file
newfilechkbx = fields.Boolean(string="New File")
notes = fields.Text(string="Notes")
so far so good.
Now i want to make these fields pass to the work order that is created I have tried this:
from odoo import models, fields, api
class MrpWorkOrderInherited(models.Model):
_inherit = 'mrp.workorder'
custom_fields = fields.Many2one('mrp.production.form')
newfilechkbx2 = fields.Boolean(related='custom_fields.newfilechkbx')
notes2 = fields.Text(related='custom_fields.notes')
but it doesnt work and i cant find anything in to help me understand how I can make it work.I have Odoo 13