Skip to content

Commit 23fee08

Browse files
committed
[FIX] project_timesheet_time_control: Avoid texts on buttons
Since v14, `string` attribute of <button> elements are directly shown in the views as text instead of being a tooltip, and thus, it takes a lot of space in screen. And it was not the intended visualization when the modules was conceived, just a side effect. Thus, we restore what we expect, moving `string` to `title` for having the tooltips again. TT40169
1 parent b871e8c commit 23fee08

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

project_timesheet_time_control/views/account_analytic_line_view.xml

+4-8
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,21 @@
1515
<field name="show_time_control" invisible="1" />
1616
<button
1717
name="button_resume_work"
18-
string="Resume work"
1918
tabindex="-1"
2019
type="object"
2120
icon="fa-play-circle text-success"
2221
attrs="{'invisible': [('show_time_control', '!=', 'resume')]}"
2322
class="oe_stat_button"
24-
title="Start work"
23+
title="Resume work"
2524
/>
2625
<button
2726
name="button_end_work"
28-
string="Stop work"
2927
tabindex="-1"
3028
type="object"
3129
icon="fa-stop-circle text-warning"
3230
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
3331
class="oe_stat_button"
34-
title="End work"
32+
title="Stop work"
3533
/>
3634
</field>
3735
</field>
@@ -48,22 +46,20 @@
4846
<field name="show_time_control" invisible="1" />
4947
<button
5048
name="button_resume_work"
51-
string="Resume work"
5249
type="object"
5350
icon="fa-play-circle text-success"
5451
attrs="{'invisible': [('show_time_control', '!=', 'resume')]}"
5552
class="oe_stat_button"
5653
context="{'show_created_timer': True}"
57-
title="Start work"
54+
title="Resume work"
5855
/>
5956
<button
6057
name="button_end_work"
61-
string="Stop work"
6258
type="object"
6359
icon="fa-stop-circle text-warning"
6460
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
6561
class="oe_stat_button"
66-
title="End work"
62+
title="Stop work"
6763
/>
6864
</div>
6965
<field name="date" position="attributes">

project_timesheet_time_control/views/project_task_view.xml

+5-9
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<field name="show_time_control" invisible="1" />
4949
<button
5050
name="button_resume_work"
51-
string="Resume work"
51+
title="Resume work"
5252
tabindex="-1"
5353
type="object"
5454
icon="fa-play-circle text-success"
@@ -57,7 +57,7 @@
5757
/>
5858
<button
5959
name="button_end_work"
60-
string="Stop work"
60+
title="Stop work"
6161
tabindex="-1"
6262
type="object"
6363
icon="fa-stop-circle text-warning"
@@ -123,24 +123,22 @@
123123
<field name="show_time_control" invisible="1" />
124124
<button
125125
name="button_resume_work"
126-
string="Resume work"
127126
tabindex="-1"
128127
type="object"
129128
icon="fa-play-circle text-success"
130129
attrs="{'invisible': [('show_time_control', '!=', 'resume')]}"
131130
class="oe_stat_button"
132131
context="{'show_created_timer': True}"
133-
title="Start work"
132+
title="Resume work"
134133
/>
135134
<button
136135
name="button_end_work"
137-
string="Stop work"
138136
tabindex="-1"
139137
type="object"
140138
icon="fa-stop-circle text-warning"
141139
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
142140
class="oe_stat_button"
143-
title="End work"
141+
title="Stop work"
144142
/>
145143
</div>
146144
</xpath>
@@ -161,7 +159,6 @@
161159
name="button_start_work"
162160
attrs="{'invisible': [('show_time_control', '!=', 'start')]}"
163161
class="o_kanban_inline_block fa fa-lg fa-play-circle text-success"
164-
string="Start work"
165162
tabindex="-1"
166163
type="object"
167164
title="Start work"
@@ -170,10 +167,9 @@
170167
name="button_end_work"
171168
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
172169
class="o_kanban_inline_block fa fa-lg fa-stop-circle text-warning"
173-
string="Stop work"
174170
tabindex="-1"
175171
type="object"
176-
title="End work"
172+
title="Stop work"
177173
/>
178174
</xpath>
179175
</field>

0 commit comments

Comments
 (0)