Debian Codegraph @

addons/hr_holidays_attendance/static/src/xml/time_off_calendar.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <templates id="template" xml:space="preserve">
4 <t t-name="hr_holidays_attendance.TimeOffCard" t-inherit="hr_holidays.TimeOffCard" t-inherit-mode="extension">
5 <xpath expr="//t[@t-set='duration']" position="replace">
6 <t t-set="duration" t-value="props.requires_allocation || props.data['overtime_deductible']?props.data['virtual_remaining_leaves']:props.data['virtual_leaves_taken']" />
7 </xpath>
8 <xpath expr="//t[@t-set='show_popover']" position="replace">
9 <t t-set="show_popover" t-value="!props.data['overtime_deductible']"/>
10 </xpath>
11 <xpath expr="//t[@name='duration_unit']" position="attributes">
12 <attribute name="t-if">props.data.request_unit == 'hour' || props.data['overtime_deductible']</attribute>
13 </xpath>
14 <xpath expr="//t[@name='duration_type']" position="attributes">
15 <attribute name="t-if">props.requires_allocation || props.data['overtime_deductible']</attribute>
16 </xpath>
17 </t>
18
19 <t t-name="hr_holidays_attendance.TimeOffCardMobile" t-inherit="hr_holidays.TimeOffCardMobile" t-inherit-mode="extension">
20 <xpath expr="//t[@t-set='duration']" position="replace">
21 <t t-set="duration" t-value="props.requires_allocation || props.data['overtime_deductible']?props.data['virtual_remaining_leaves']:props.data['virtual_leaves_taken']" />
22 </xpath>
23 <xpath expr="//t[@name='duration_type']" position="before">
24 <t t-if="props.data['overtime_deductible'] == true &amp;&amp; !props.requires_allocation">
25 <strong t-esc="duration" class="o_timeoff_green"/> <t t-if="props.data['request_unit'] == 'hour'">Hours</t><t t-else="">Days</t> <span class="o_timeoff_green">Available</span>
26 </t>
27 </xpath>
28 <xpath expr="//t[@name='duration_type']" position="attributes">
29 <attribute name="t-if"/>
30 <attribute name="t-elif">props.requires_allocation</attribute>
31 </xpath>
32 </t>
33 </templates>