I have a Many2one field which is linked to another model:
field_id = fields.Many2one(''model.name")
Then I use this, to make it related with a field.
related_field = fields.Integer(related="field_id.computed_field")
I also made the default of Many2one field by using this function:
def defaultm2o(self):
return self.env['hotel.room'].search([], limit=1).id
Now, why my Many2one field won't give values to my related fields unless I specify it to xml?
and most importantly, how do I make it that I may not include it in xml file?