def METHOD_NAME(self):
    self.ensure_one()
    address_id = self._context.get("address_id")
    object_name = self._context.get("object_name")
    if address_id and object_name:
        obj = self.env[object_name].browse(address_id)
        obj.write(self.set_result())
    return True