diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-02-10 14:23:02 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-02-10 14:23:02 +0700 |
| commit | 8a29d6ef46d15fbce033b94464e139cabb8aeb68 (patch) | |
| tree | e2c5ccdcbb1c47151fc9dd4b05db7f68fa2022fb | |
| parent | 3d5e57a2d892551965bcf079f7c728d00989af8e (diff) | |
<iman> update yg sama
| -rw-r--r-- | indoteknik_custom/models/user_pengajuan_tempo_request.py | 5 |
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({ |
