I want to remove the delete icon in Odoo for some line in the one2many field where the Boolean field is True
You need to disable default delete button, then create your own delete button and apply your condition on it:
<tree string="My Tree" delete="false">
<field name="my_field1"/>
<field name="my_field2"/>
<field name="my_boolean_field"/>
<button name="unlink"
string="Unlink"
type="object"
class="btn-secondary"
attrs="{'invisible': [('my_boolean_field', '=', False)]}"
icon="fa-trash-o"/>
</tree>