There is a mismatch when you select a pill_no equals to 0. This adds a o_field_empty class.
To avoid this I suggested this :
<templates>
<t t-name="FieldColorPills">
<t t-foreach="widget.totalColors" t-as='pill_no'>
<span t-attf-class="o_color_pill o_color_#{pill_no+1} #{widget.value === pill_no+1 and 'active' or ''}" t-attf-data-val="#{pill_no+1}"
data-toggle="tooltip" data-placement="top" t-attf-title="This color is used in #{widget.colorGroupData[pill_no] or 0 } books."/>
</t>
</t>
</templates>
There is a mismatch when you select a pill_no equals to 0. This adds a o_field_empty class.
To avoid this I suggested this :
Please let me know if there is a better way.