Skip to content

Commit 9c36673

Browse files
[IMP] keep radio left and right side in manual merge wizard
1 parent 22996db commit 9c36673

File tree

4 files changed

+22
-26
lines changed

4 files changed

+22
-26
lines changed

merge_duplicate_contacts/__manifest__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"data/ir_domain_email.xml",
1313
"wizard/merge_contact_view.xml",
1414
],
15+
'assets': {
16+
'web.assets_backend': [
17+
'merge_duplicate_contacts/static/src/css/merge_radio.css',
18+
],
19+
},
1520
"installable": True,
1621
"application": False,
1722
"auto_install": False,
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.keep-type-radio .o_radio {
2+
display: flex;
3+
justify-content: space-between;
4+
width: 100%;
5+
}
6+
7+
.keep-type-radio .o_radio_item:first-child {
8+
margin-left: -241px;
9+
}
10+
11+
.keep-type-radio .o_radio_item:last-child {
12+
margin-left: 451px;
13+
}

merge_duplicate_contacts/wizard/merge_contact_view.xml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -983,37 +983,15 @@
983983
style="min-width: 108px;"
984984
/>
985985
</div>
986-
<div class="col-3">
986+
<div class="col-9">
987987
<field colspan="5" name="keep1" nolabel="1" invisible="1" />
988-
</div>
989-
<div class="col-3">
990988
<field
991989
name="keep_type"
992990
widget="radio"
993991
options="{'horizontal': True}"
994992
nolabel="1"
993+
class="keep-type-radio"
995994
/>
996-
<!-- It's in odoo 15.0 but removed but not using in 18.0 -->
997-
<!-- <button
998-
colspan="1"
999-
name="swap_to_left"
1000-
type="object"
1001-
title="left"
1002-
class="fa fa-arrow-left"
1003-
style="display:none;"
1004-
context="{'field_name': 'company_id2', 'field_name2': 'company_id'}"
1005-
/>
1006-
<button
1007-
colspan="1"
1008-
name="swap_to_right"
1009-
type="object"
1010-
title="right"
1011-
class="fa fa-arrow-right"
1012-
style="display:none;"
1013-
context="{'field_name': 'company_id', 'field_name2': 'company_id2'}"
1014-
/> -->
1015-
</div>
1016-
<div class="col-3">
1017995
<field colspan="4" name="keep2" nolabel="1" invisible="1" />
1018996
</div>
1019997
</div>

merge_duplicate_contacts/wizard/merge_partner_manual.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ class MergePartnerManualCheck(models.TransientModel):
102102
keep2 = fields.Boolean("Keep 2")
103103
keep_type = fields.Selection(
104104
[
105-
("keep1", "Keep Left"),
106-
("keep2", "Keep Right"),
105+
("keep1", ""),
106+
("keep2", ""),
107107
],
108108
default="keep1",
109109
)

0 commit comments

Comments
 (0)