I am trying to do some styling on a project kanban tile based on a selection field I added to the task. Here is a snippet of my attempt.
<xpath expr="//div[@class='oe_kanban_bottom_left']" position="replace"/>
<!-- Color border -->
<xpath expr="//templates/t/div" position="attributes">
<t t-if="record.order_type.raw_value == 'store'">
<attribute name="t-attf-style">margin-bottom: 10px; border-width: 5px; border-color: steelblue;</attribute>
</t>
<t t-else-if="record.order_type.raw_value == 'curb'">
<attribute name="t-attf-style">margin-bottom: 10px; border-width: 5px; border-color: firebrick;</attribute>
</t>
<t t-else-if="record.order_type.raw_value == 'delivery'">
<attribute name="t-attf-style">margin-bottom: 10px; border-width: 5px; border-color: mediumseagreen;</attribute>
</t>
</xpath>
This results in only the last attribute getting used regardless of the value of order_type. I think this is because the <t> elements are just getting ignored. I have also tried to use the <t t-esc> to embed the color text in the value, but that resulted in outputting an empty string. I also tried attaching t-if attributes on the <attribute> tag itself. None of these things have worked.
Any suggestions on how to apply a style based on the value of the task?