To explain this and make it clearer,this type of checkbox that you want to add works only with the manytomany fields,and this field will display one checkbox for each record existing in the model targeted by the relation, according to the given domain if one is specified.Checked records will be added to the relation
and There’s no way to use this widget to create new items
<field name="field_name" widget="many2many_checkboxes"/>
and as it seems you declared that field as selection filed so you have two options the first is to follow the first method of boolean type or to do like Ankit H had said
you could create boolean fields for each selection and put them in your view definition like this in the .py file:
_columns = {
'dr': fields.boolean('Debit'),
'cr': fields.boolean('Credit'),
}
and in the xml:
<field name="arch" type="xml">
<form>
<group>
<field name="dr" attrs="{'invisible': [('cr','=',True)]}"/>
<field name="cr" attrs="{'invisible': [('dr','=',True)]}"/>
</group>
</form>
</field>
hope it helps you