'When changing the object_write type configuration:
- `current`: crud_model_id is the same as base model
- `other`: disassemble the reference object to have its model
- `expression`: has its own on_change, nothing special here'

def _onchange_write_config(self):

    crud_model_id = self.crud_model_id
    if (self.use_write == 'current'):
        self.crud_model_id = self.model_id
    elif ((self.use_write == 'other') and self.ref_object):
        ref_model = self.ref_object._name
        self.crud_model_id = self.env['ir.model'].search([('model', '=', ref_model)])
    elif (self.use_write == 'expression'):
        pass
    if (self.crud_model_id != crud_model_id):
        self.link_field_id = False
