summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-02-10 14:23:02 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-02-10 14:23:02 +0700
commit8a29d6ef46d15fbce033b94464e139cabb8aeb68 (patch)
treee2c5ccdcbb1c47151fc9dd4b05db7f68fa2022fb
parent3d5e57a2d892551965bcf079f7c728d00989af8e (diff)
<iman> update yg sama
-rw-r--r--indoteknik_custom/models/user_pengajuan_tempo_request.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/user_pengajuan_tempo_request.py b/indoteknik_custom/models/user_pengajuan_tempo_request.py
index 81509df4..3f960e58 100644
--- a/indoteknik_custom/models/user_pengajuan_tempo_request.py
+++ b/indoteknik_custom/models/user_pengajuan_tempo_request.py
@@ -513,8 +513,9 @@ class UserPengajuanTempoRequest(models.Model):
], limit=1)
if existing_contact:
- # Perbarui data yang ada
- existing_contact.write(contact_data)
+ # Perbarui hanya field yang tidak menyebabkan konflik
+ update_data = {k: v for k, v in contact_data.items() if k != 'name'}
+ existing_contact.write(update_data)
else:
# Buat kontak baru jika belum ada
self.env['res.partner'].create({