diff options
| -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({ |
