Skip to content

Commit 4863add

Browse files
committed
fix(spp_change_request_v2): hide Check for Updates when conflict detection disabled
1 parent 77fde09 commit 4863add

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

spp_change_request_v2/models/change_request_conflict.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ class SPPChangeRequestConflict(models.Model):
1212
_name = "spp.change.request"
1313
_inherit = ["spp.change.request", "spp.cr.conflict.mixin"]
1414

15+
is_conflict_detection_enabled = fields.Boolean(
16+
related="request_type_id.enable_conflict_detection",
17+
)
18+
1519
# ══════════════════════════════════════════════════════════════════════════
1620
# OVERRIDE CRUD TO INTEGRATE CONFLICT DETECTION
1721
# ══════════════════════════════════════════════════════════════════════════

spp_change_request_v2/views/conflict_extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
string="Check for Updates"
125125
type="object"
126126
class="btn-link"
127-
invisible="approval_state != 'draft'"
127+
invisible="approval_state != 'draft' or not is_conflict_detection_enabled"
128128
help="Check if other requests have been completed"/>
129129
</xpath>
130130

0 commit comments

Comments
 (0)